Robert Germain
New Member
- Joined
- Mar 18, 2003
- Messages
- 11
I have a workbook where I need to copy data in a workbook (SAT_Marzo.xlsm) from B3 to the last cell containing data and paste this into a different workbook (CONTABILIDAD TOTAL 2018.xlsm) in the first non empty cell of column C.
This is the code I have presently where I am able to select the text and copy it to the first empty cell but this is in the same workbook (SAT_Marzo.xlsm).
Sub LastRowInOneColumn()
Dim LastRow As Long
With ActiveSheet
.Range("B3:B" & .Cells(Rows.Count, 2).End(xlUp).Row).Copy
.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial
End With
End Sub
How can I modify this code to get my data copied correctly?
Thanks.
This is the code I have presently where I am able to select the text and copy it to the first empty cell but this is in the same workbook (SAT_Marzo.xlsm).
Sub LastRowInOneColumn()
Dim LastRow As Long
With ActiveSheet
.Range("B3:B" & .Cells(Rows.Count, 2).End(xlUp).Row).Copy
.Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).PasteSpecial
End With
End Sub
How can I modify this code to get my data copied correctly?
Thanks.
Last edited: