Hello, i was wondering how i would loop this macro (and others like it) all the way down to cell 66500 or what ever the last one is.
Here is my macro
Thanks.![]()
Please Login or Register to view this content.
Hello, i was wondering how i would loop this macro (and others like it) all the way down to cell 66500 or what ever the last one is.
Here is my macro
Thanks.![]()
Please Login or Register to view this content.
Hi
will give you a range of row to cycle through, assuming that column A will contain an entry that determines the last row.![]()
Please Login or Register to view this content.
The bit of you code
shows you want to clear every 5th row, but what is the value of n? Do you want to clear rows 5,10,15....?![]()
Please Login or Register to view this content.
If you have a row that can give a mod of 0, then you could do something like
HTH![]()
Please Login or Register to view this content.
rylo
hmm...you said mod a couple times, what do you mean by it?
your macro got an error on the row
and also, what exactly does this mean:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
I just ask because i want to be able to learn how to do loops my own
Thanks.
Paul
Paul
1) Mod it the function thatSo if you divide 10 by 5, then the remainder is 0. Basically it is a way to determine every 5th row.Returns the remainder after number is divided by divisor. The result has the same sign as divisor.
2) What you are doing is creating a loop that counts from 1 to ???. The ??? is determined to be the last filled row in column A () For every iteration, i increments by 1. This is the default, and you can change the amount it increments by using the step argument. Have a look at the help file on the for loop.![]()
Please Login or Register to view this content.
3) I put some numbers into a range on a sheet from A1:A50. Then run the code
It will clear out every 5th row (ie 5,10,15....)![]()
Please Login or Register to view this content.
HTH
rylo
Awesome, Thanks! it works nowand it pointed me int he right direction for looping stuff
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks