Thread: UsedRange?
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Steve Steve is offline
external usenet poster
 
Posts: 1,814
Default UsedRange?

morning all.
I'm trying to modify an old macro that iterates through a UsedRange of cells.
My code is:

If ActiveCell < "" Then
For i = 0 To UsedRange 'Step UsedRange

ActiveCell.Offset(rowoffset:=1, columnoffset:=0).Activate

'my later procedures go here....

Next i

End If

So far, this only steps 1 cell, and stops. I need it to step through all
cells in a used range. However, when I use "Step UsedRange" it runs out to
the very end of the worksheet--- 1mRows.
When I check the actual used rows, it stops at row 287. I.e., I did ctrl +
End, and that's where it stopped.
My UsedRange will vary from worksheet to worksheet.
What am I doing wrong here?
Thank you, in advance.