How to set Range reaching the last row?

F

fred

Hello,
Some functions allow specifying the range the following way:
Range("A1:A10")

How to include the last (max) row in that instead of A10?
Thanks,
Fred
 
G

Gary''s Student

Sub RangeROver()
Dim r As Range
Set r = Range("A1:A" & Cells(Rows.Count, "A").End(xlUp).Row)
End Sub
 
Top