View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Alan Beban[_4_] Alan Beban[_4_] is offline
external usenet poster
 
Posts: 171
Default getting coordinates of a range

Well, it isn't Access but how about:

Sub test3000()
Dim myRange As Range, row
Set myRange = Range("b3:b32")
For Each row In myRange.Rows
Debug.Print row.Row
Next
End Sub

And for what it's worth, with 30 rows starting at b3 you want
3,4,5.....32 returned; and I wouldn't really use a variable named row,
the same as the name of an Excel Property.

Alan Beban

Kent Eilers wrote:
ok - spent over an hour on this so far with no luck ...(including google
newgroups)

I want to get the row number for each row in a range....so if a range has 30
rows starting at B3 then I want 3,4,5.....33 returned.

Is this possible? Probably easy but I'm missing it....

If this was access I would use the "for each row in myrange.rows"
collection and look at the property values to get this but I noticed excel
does not have a 'property' nor 'row' object.

Thanks