PDA

View Full Version : Macro to loop through solver and post results to separate sheet



Roofasa
08-03-2016, 08:59 PM
Hi guys, new to the forum and new to VBA, really appreciate any help possible.

I am trying to write a macro that will solve 5 scenarios, with information taken from the 'scenarios' sheet, with solver, and then post the results of each situation to a separate sheet.

It seems as if all my code works correctly, however, my code makes my macro loop through the five situations first, then post the result of the 5th situation 5 times, instead of posting the result of each situation as it is solved.

Not sure where I am going wrong.
P.S sorry if my code is written poorly, I'm learning slowly! :doh:

well three hours later I actually managed to solve the problem. I had for some reason put loops in my subs within the main loop. Seems simple now.:banghead:

16783