Forum Discussion
MelsZey
Oct 28, 2021Copper Contributor
Macro For-next Loop Problem Excel
Hello, I need to pull two-column data from one sheet to another sheet in Excel according to certain rules, I have three different main determinants. I wrote a code specific to the first ca...
JKPieterse
Nov 01, 2021Silver Contributor
I don't have an answer to your question, but I do want to share this: It is bad practice to change the value of a loop counter within the loop. I think your loop will do the same if you change
For j = 4 To last
to:
For j = 4 To last Step 3
and delete the line j = j + 2.
For j = 4 To last
to:
For j = 4 To last Step 3
and delete the line j = j + 2.