Alex Piotto
Board Regular
- Joined
- Jul 5, 2016
- Messages
- 82
- Office Version
- 2007
- Platform
- Windows
Hi, i am using the code below
and
to find the last empty row in a sheet and paste some values there. It works.
I now need to do the same in another sheet, this time finding the last empty colum and paste some value.
i am tryng to use this
with this
but it paste the values always in the same column... what i am doing wrong?
VBA Code:
lastRow = Sheets("RESUMO").Cells(Rows.Count, "A").End(xlUp).Row
Code:
ThisWorkbook.Sheets("VENDAS").Range("DATAVENDA").Copy
ThisWorkbook.Sheets("RESUMO").Range("A" & lastRow + 1).PasteSpecial Paste:=xlPasteValues
to find the last empty row in a sheet and paste some values there. It works.
I now need to do the same in another sheet, this time finding the last empty colum and paste some value.
i am tryng to use this
Code:
lastCol = Sheets("DETTAGLI").Cells(Columns.Count, "A").End(xlUp).Column
Code:
ThisWorkbook.Sheets("VENDAS").Range("C8:C127").Copy
ThisWorkbook.Sheets("DETTAGLI").Range("C8:C127" & lastCol + 1).PasteSpecial Paste:=xlPasteValues
but it paste the values always in the same column... what i am doing wrong?