Harshil Mehta
Board Regular
- Joined
- May 14, 2020
- Messages
- 85
- Office Version
- 2013
- Platform
- Windows
Expectation: I want to copy data from sheet7.Range G10 till the last row and paste in sheet4, Row No.10, last column available.
Problem: The below code does not copy or paste (no error is shown by the debugger). I dont understand where I am going wrong.
Could anyone please help me?
Problem: The below code does not copy or paste (no error is shown by the debugger). I dont understand where I am going wrong.
Could anyone please help me?
VBA Code:
Sub cf()
Dim lr, lcol1 As Long
With Sheet7
lr = .Cells(.Rows.Count, 7).End(xlUp).Row
lcol1 = Sheet4.Cells(10, Columns.Count).End(xlToLeft).Column + 1
.Range("G10" & lr).Copy
Sheet4.Cells(10, lcol1).PasteSpecial
End With
End Sub