I am trying to run what I think is a simple cut and paste macro but am having problems with it. What I am trying to do is cut data from one worksheet “Import” and paste to another worksheet “Master” what I am trying to do is go down to the last row in “Import” column b and cut data that is in columns b,c,d,e to “Master” F29:I29
Could someone please tell me what I am doing wrong as it will only paste the data in column B
Thanks you
Sub Macro5()
'
' Macro5 Macro
'
Range("F29").Select
Sheets(" import").Select
Range("B1").End(xlDown).Select
LastRow = Range("B1").End(xlDown).Row
Range(B, C, D, E).Cut
Sheets("Master").Select
Range("F29:I29").Select
ActiveSheet.Paste
Range("F28").Select
End Sub
Maybe this will do the trick for you. You could just do the one line to cut it if you wanted I didnt know if you are trying to cut or copy the data.Sub Macro5() ' ' Macro5 Macro ' Range("F29").Select Sheets("Import").Select Range("B1").End(xlDown).Select LastRow = Range("B1").End(xlDown).Row Range(ActiveCell, ActiveCell.Offset(0, 4)).Copy Range(ActiveCell, ActiveCell.Offset(0, 4)).Cut Sheets("Master").Select Range("F29:I29").Select ActiveSheet.Paste Range("F28").Select End Sub
works great thanks... i did have to change the ("F29:I29") to just (F29")
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks