View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
LuisE LuisE is offline
external usenet poster
 
Posts: 133
Default Fill Down to Stop at Last Row

How can I make this to stop at the last used row? It goes to the row 65536

Sub FillDownByColumn()
Do Until y = Range("A1").CurrentRegion.Rows.Count - 1
Selection.End(xlDown).Activate
Range(Selection, Selection.End(xlDown).Offset(-1, 0)).Select
Selection.FillDown
y = Selection.Row
Loop
End Sub

Thanks in advance