Copy Worksheet..Howe ??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Can anybody give the code to create a macro which will select the entire
contents of worksheet1 (except the headers which are on cells A2:G2) and
paste this onto the next available line on worksheet 2 ??

Easy....uh !!!!!!

thanks/regards
Anthony
 
Possibly

Sub Macro1()
Dim rng as Range, rng1 as Range
set rng = Application.UsedRange
set rng1 = Range(Range("A3"),rng)
rng1.copy Destination:=worksheets("sheet2").Range("A2")
End sub
 
Anthony

To copy to the first available row, change

rng1.copy Destination:=worksheets("sheet2").Range("A2")

to

rng1.copy Destination:=worksheets("sheet2".Cells(Rows.Count, _
1).End(xlUp).Offset(1, 0)


Gord Dibben Excel MVP
 
Back
Top