I need some help with the below code, what i'm trying to do is copy A10-E10 as long to the last row of data, paste the copied data to another workbook last column but i cant get the paste to work, i dont know where to add that part to the code, and add the destination.
Sub Copy_Data_to_last_row()
Dim xScreenUpdating As Boolean
Dim xPastewindows As Windows
Dim xRg As Range
'
Windows("Exceptions report.xlsx").Activate
Range("A10:E10").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("A10:E10").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlUp)).Select
Selection.Copy
Application.ScreenUpdating = False
xRg.Copy
xpaste.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = xScreenUpdating
End Sub
Bookmarks