View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary''s Student Gary''s Student is offline
external usenet poster
 
Posts: 11,058
Default How to set Range reaching the last row?

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

--
Gary''s Student - gsnu200856


"fred" wrote:

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