Hello,
I like to copy row based on multiple conditions and I hacve a problem with letters. I like to check if cell in column O contains letters P and R, and if so, copy row to next sheet.
my code is (with not working P and R)
Please help
Best Regards
W.
I like to copy row based on multiple conditions and I hacve a problem with letters. I like to check if cell in column O contains letters P and R, and if so, copy row to next sheet.
my code is (with not working P and R)
Code:
Dim cell1 As RangeDim lastRow1 As Long, i As Long
lastRow1 = Range("N" & Rows.Count).End(xlUp).Row
i = 2
For Each cell1 In Sheets(1).Range("N1:N" & lastRow1)
If cell1.Value = "TRANSFERING" [B]And Cells(cell1.Row, 15) [/B]=[B] "*P*" And Cells(cell1.Row, 15) [/B]= [B]"*R*" [/B]Then
cell1.EntireRow.Copy Sheets("fullList").Cells(i, 1)
i = i + 1
End If
Next
Please help
Best Regards
W.