Hi, I am a very new user of VBA. I am attempting to nest a loop inside another loop. I am not certain of the correct formatting for nesting the inner loop, and how to declare the variables of the inner loop. I am not certain if a For each loop should be used instead of a Do Until loop for the inner loop.
I would like for the a b c d variables to increment together as a+1 b+1 c+1 and d-1 with each inner loop cycle.
I would like to initialize a as 1, b as 1, c as 2, and d as 2 with the ability to change this initialization.
I would like to print the outcome to Cells(i, 17).
Thanks in advance for your kind consideration. I would really appreciate any help you may offer. Thank you.
.bas file attached
notepad copy of code attached
spreadsheet before attached
spreadsheet after attached (runs with my program as shown in the .bas file. Problem is, the program becomes very long and exceeds 64kb and thus I want to loop the repetitive part of it as described in the .bas file)
Thank you!
Bookmarks