copy data from a list to another sheet

  • Thread starter Thread starter karaeloko
  • Start date Start date
K

karaeloko

Hi,
I have a list or database in excel and I need to copy the
data I select to another sheet. Let me explain: suppose I
select the range A1:E1 from the table and copy/paste it to
A1:E1 (sheet2), then I select A9:E9 and copy it to A2:E2
on sheet2.
How can I create a macro that will copy my selection and
paste it on the other sheet/workbook next to the last row
of data entered.
 
here is one way
Sub test()
Selection.Copy Destination:=Sheet2.Range("A65536").End(xlUp).Offset(1, 0)
End Sub

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **
 
Cells(selection.Row,1).Resize(1,5).Copy _
Destination:=Worksheets("Sheet2"). _
Cells(rows.count,1).End(xlup)(2)

or the more general:

Selection.Copy _
Destination:=Worksheets("Sheet2"). _
Cells(rows.count,1).End(xlup)(2)
 
thank you!

Regards,
-----Original Message-----
here is one way
Sub test()
Selection.Copy Destination:=Sheet2.Range("A65536").End (xlUp).Offset(1, 0)
End Sub

--
Paul B
Always backup your data before trying something new
Using Excel 97 & 2000
Please post any response to the newsgroups so others can benefit from it
** remove news from my email address to reply by email **




.
 
thank you!...

regards,
-----Original Message-----
Cells(selection.Row,1).Resize(1,5).Copy _
Destination:=Worksheets("Sheet2"). _
Cells(rows.count,1).End(xlup)(2)

or the more general:

Selection.Copy _
Destination:=Worksheets("Sheet2"). _
Cells(rows.count,1).End(xlup)(2)

--
Regards,
Tom Ogilvy




.
 
Back
Top