SAMCRO2014
Board Regular
- Joined
- Sep 3, 2015
- Messages
- 158
I am stumped on how to code something. I am using copy and paste from Worksheet “SPS”and pasting the data to the first blank cell of a specific column in Worksheet “Data”.I had no problems figuring this out except formy last column.
I want to find the first empty cell in column N and paste the information starting in the adjacent cell in Column O.
This is what I have:
'Copy and paste Projection Amount Data
Dim SPS As Worksheet
Set SPS = ThisWorkbook.Sheets("SPS+")
Dim lastO As Long
LastRowSPS2 =SPS.Cells(Rows.Count, 1).End(xlUp).Row
Range("N3:N" &LastRowSPS2).Copy
With Data
lastO =.Range("N" & Rows.Count).End(xlUp).Row + 1
.Range("N"& lastO).PasteSpecial xlPasteColumnWidths
.Range("N"& lastO).PasteSpecial xlPasteValues
End With
ActiveSelection.Cut
ActiveSelection.Offset(0,1).PasteSpecial xlPasteValues
I want to find the first empty cell in column N and paste the information starting in the adjacent cell in Column O.
This is what I have:
'Copy and paste Projection Amount Data
Dim SPS As Worksheet
Set SPS = ThisWorkbook.Sheets("SPS+")
Dim lastO As Long
LastRowSPS2 =SPS.Cells(Rows.Count, 1).End(xlUp).Row
Range("N3:N" &LastRowSPS2).Copy
With Data
lastO =.Range("N" & Rows.Count).End(xlUp).Row + 1
.Range("N"& lastO).PasteSpecial xlPasteColumnWidths
.Range("N"& lastO).PasteSpecial xlPasteValues
End With
ActiveSelection.Cut
ActiveSelection.Offset(0,1).PasteSpecial xlPasteValues
Last edited: