Hi, i'm trying to get the section of code [For i = 1 to N] through [Next i] to loop within the larger loop. Does anyone know how to do this?
![]()
Please Login or Register to view this content.
Hi, i'm trying to get the section of code [For i = 1 to N] through [Next i] to loop within the larger loop. Does anyone know how to do this?
![]()
Please Login or Register to view this content.
As far as I can see the 1 to N loop is nested within the 1 to NumRows loop.
What makes you think it isn't?
Is the code not doing what you want?
Is it producing incorrect results?
If posting code please use code tags, see here.
In column K I have a list of numbers. I'm trying to copy the first set of numbers in K1 and then paste under the last set of numbers in column A. I also need the number pasted 21 times. Then, I want to go to the next set of numbers in column k and repeat the process until there are no more numbers in column k. The following code works but, i have to keep pushing the macro button 61 times until I've gone through every number set in column k. So, i'm trying to get it so i don't have to keep pressing the macro button over and over again.
![]()
Please Login or Register to view this content.
I don't think you need the 2nd loop.
If you want to copy the same thing N no of times use resize.
For example, something like this.
![]()
Please Login or Register to view this content.
i don't think i put it in the code correctly... it keeps pasting over and over again - looks like its kind of working though.. it just keeps pasting over and over again...
![]()
Please Login or Register to view this content.
The code I posted will copy each value from column K and paste them 21 times to column A.
It's meant to replace your code.
Oh - sorry about that. I removed my code and your code worked perfect! Thanks so much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks