loop till no more data

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
 
J

John Bundy

Change the sheet and column as needed
For c = 1 to Sheets(1).Cells(Rows.Count, "C").End(xlUp).Row
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top