selecting only used rows

  • Thread starter Thread starter intheway
  • Start date Start date
I

intheway

How can tell I excel to paste data to only those rows that contain data
The file will range in size, so the number of rows used will alway
change on a daily basis. I would like to automate the process, but
don't know the commands that will select and paste to only those row
that contain data.

Thank
 
Hi
in a macro you may use the following statements:
Sub copy_used()
Dim source As Worksheet
ActiveSheet.UsedRange.Copy
Set source = Worksheets("Sheet2")
source.Paste Destination:=source.Range("A1")
End Sub
 
Back
Top