COPY AND PASTE

P

Polarbilly

I'm using GO TO /Current Region to create a macro to select a block of data
to copy and paste into a new worksheet. However, I dont want to copy the
header line...anyone???
 
F

Fred Smith

Something like this will solve your problem. You need to resize your range to
exclude the first row:

Set Workrange = Workrange.Offset(1, 0).Resize(Workrange.Rows.Count - 1)
 
J

JMB

Assuming the headers occupy only one row. If more than 1 row is a header,
change the two 1's in the line beginning with ".Offset(1,0)....." to whatever
you need.

Sub test()
With Sheets("Sheet1").Range("A1").CurrentRegion
.Offset(1, 0).Resize(.Rows.Count - 1, _
.Columns.Count).Copy _
Destination:=Sheets("Sheet2").Range("A1")
End With
End Sub
 
Top