loop till no more data

  • Thread starter Thread starter SLP
  • Start date Start date
S

SLP

Hi,

How to I fix this so the loop stops when there is no more rows with data on
it? The number of rows will change each time the tool is used and I don't
want to have to guess every few days as to what number to use. Thanks much.

Sub MyLoop
For c = 1 to 1500
Call AllocateNew
Next c
End Sub
 
Change the sheet and column as needed
For c = 1 to Sheets(1).Cells(Rows.Count, "C").End(xlUp).Row
 
Back
Top