View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vasant Nanavati Vasant Nanavati is offline
external usenet poster
 
Posts: 1,080
Default Limit the Loop to 500 Rows

If you post the relevant code it would be helpful. But in general:

Dim c As Range
Set c = Range("A1")
Do Until c.Row 500
Debug.Print c.Row
Set c = c.Offset(1)
Loop

--

Vasant




"SteveF" wrote in message
...
I have a macro that runs well down a column but I need to define the
Do Until
statement to stop it at row 500 and am stumped on how to do this.
Please help with this simple request. Thanks
Steve