View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Code to Resize a variable number of rows including target

I have the ?? hard coded in my macro but sometimes the number of rows to include vary.

I know I have hit all around it but can't nail the proper xldown.rows.count or Rows.Count).End(xlUp)scheme to replace the ??.

I thought for sure I would have it in my cheat-sheet but...

If Not aCell Is Nothing Then
aCell.Resize(??, 1).Copy Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp)(2)
End If

Thanks,
Howard