PDA

View Full Version : How to Optimize 6 nested loop coding in VBA.



rajamasa
04-13-2015, 08:31 AM
Hi,

I have 6 variables in my program and i have to check all combination of 6 variables to find the maximum (Attaching the sample excel sheet with the code). I have to do a more complex calculation and for much more data (complex numbers). The code takes for ever if i change the range to anything greater than 1 and does not respond.I am a beginner in coding and would appreciate a better code to make it work. Thanks in advance for any help.