Hi all,
I'm a bit stuck with this piece of code i found on the net:
sub Function Button1_Click
Dim lRow As Long
Dim lLastRow As Long
Dim rngNext As Range
Dim x As Long
Set rngNext = Sheets("original").Range("A65536").End(xlUp).Offset(1, 0).EntireRow
With Sheets("Sheet2")
lLastRow = .Range("G65536").End(xlUp).Row
'Search from bottom to top so that rows are not skipped when a row is cut
For lRow = lLastRow To 2 Step -1
If .Cells(lRow, "O").Text = "No" Then
.Rows(lRow).EntireRow.Copy
rngNext.Offset(-x, 0).Insert Shift:=xlDown
x = x + 1
End If
Next lRow
End With
End Sub
The problem is, that in the final step, it pasts the entire row from Sheet2 onto the bottom of sheet "original". I would like to only past the cells from column range A to N to be pasted (in case there already would be data in the cells of column O or P they would not be overwritten by pasting the full row).
Is there somebody who can help me out with this issue?
Thanks in advance!
Bookmarks