bryanalmeida525
New Member
- Joined
- Dec 12, 2017
- Messages
- 12
Code:
Sub STEP2()
Dim Lastrow As Long
Dim Lastrow2 As Long
Dim Lastrow3 As Long
Dim Lastrow4 As Long
Dim Lastrow5 As Long
Dim Lastrow6 As Long
Application.ScreenUpdating = False
With Sheets("amir")
Lastrow = .Cells(Rows.Count, 2).Row
Lastrow2 = .Cells(Rows.Count, 7).Row
Lastrow3 = .Cells(Rows.Count, 17).Row
Lastrow4 = .Cells(Rows.Count, 22).Row
End With
With Sheets("Entry")
Lastrow5 = .Cells(Rows.Count, 1).Row
Lastrow6 = .Cells(Rows.Count, 8).Row
End With
Sheets("amir").Range("B4:B" & Lastrow).copy
Sheets("Entry").Range("A7").PasteSpecial xlPasteValues
Sheets("amir").Range("B4:B" & Lastrow).copy
Sheets("Entry").Range("A" & Lastrow5).PasteSpecial xlPasteValues
Sheets("amir").Range("G4:G" & Lastrow2).copy
Sheets("Entry").Range("H" & Lastrow6).PasteSpecial xlPasteValues
Sheets("amir").Range("G4:G" & Lastrow2).copy
Sheets("Entry").Range("H" & Lastrow6).PasteSpecial xlPasteValues
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
** I Keep getting Run Time error 1004 Cant paste because the copy are and paste are aren't the same size.
Please help.
Last edited by a moderator: