View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Finding the last row of a contiguous range

sorry, forgot something:

dim lastrow as long
dim ws as worksheet

Set ws = Worksheets("Sheet1")
lastRow = ws.Cells(Rows.Count, "A").End(xlUp).Row

range("A1:A" & lastrow).copy


--


Gary


"RalphH" wrote in message
ups.com...
Is there a better way of finding the last row of a contiguous range
than:

Selection.End(xlDown).Select