Welcome to the board!
Please use code tags when posting code.
In your studies, look for Guru's who teach using Range instead of Selection. Code execution is faster and you won't have as many suprises. Yes, I know, Excel generates code using Selection, but it has to since everything is created without defined values.
In your code, you're not pasting anything.
Sub cutt()
Dim WS As Worksheet
Dim WSDest As Worksheet
Dim LastRow As Long
Dim LRDest As Long
Set WS = Worksheets("Sheet1") 'Change as required.
Set WSDest = Worksheets("Sheet2") 'Change as required.
With WSDest
LRDest = .Cells(.Rows.Count, 1).End(xlUp).Row
End With
With WS
LastRow = .Cells(.Rows.Count, 2).End(xlUp).Row
For i = 2 To LastRow
If .Cells(i, 11).Text <> "#N/A" Then
.Cells(i, 11).EntireRow.Copy
With WSDest
LRDest = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
End With
WSDest.Range("A" & LRDest).PasteSpecial xlPasteValues
End If
Next
End With
Application.CutCopyMode = False
End Sub
Bookmarks