Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and Paste Range 1

Status
Not open for further replies.

max1565

Technical User
Dec 16, 2002
57
US
I need to copy and paste a range from one sheet to the next empty row on another sheet, ie:

copy Sheets("sheet1").range("a4:j4")

to
next empty row on sheet2

Can someone please help me out?

Thanks
 
Not sure on the code, but I can sugest that you record a Macro and then viw the source for that, then you will get the code you need ;)
 
Hi max1565,

You will need to play around with the following code to copy other ranges to the next empty row on Sheet2, but it will do what you requested:

Code:
Sub Macro1()
Dim LastRow As Integer
LastRow = Sheet2.Range("A1").End(xlDown).Row
    Sheet1.Range("a4:j4").Copy Destination:= _
        Sheet2.Range("A" & LastRow + 1)
End Sub

If you want to be able to copy the actual selected range to the next empty row on Sheet2 then replace Sheet1.Range("a4:j4").Copy with Selection.Copy

Hope this helps!!!







If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
Then how about a star . . . . :-(



If you can't be "The Best", be the best at what you can!!!

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top