-
Dynamic for loop
Hi all
I am asking if I can make dynamic for next according filled range because most of my friends are using standard for next loop as the following:
I want for loop works until filled range finish and this range is changable
what can I put instead of 1000 to let for loop to be dynamic
thanks
-
Re: Dynamic for loop
take a variable and store
dim LastRow as long
LastRow = cells(cells.rows.count,"A").end(xlUP).row
-
Re: Dynamic for loop
also can be like this
Code:
Dim LastRow As Long
LastRow = Sheets(1).Range("A65536").End(xlUp).Row