Group the conditions for the three tested cells in a given row.
Group conditions with parenthesis like this...
If Cells(x, 11).Value = "B" And (Cells(x, 20).Value = "M" Or Cells(x, 20).Value = "Mo" Or Cells(x, 20).Value = "S") And (Cells(x, 16).Value <> "M" And Cells(x, 16).Value <> "Mo" And Cells(x, 16).Value <> "S") Then Cells(x, 11).Value = ""
Or group conditions with nested IFs like this...
For x = 3 To finalrow
If Cells(x, 11).Value = "B" Then
If Cells(x, 20).Value = "M" Or Cells(x, 20).Value = "Mo" Or Cells(x, 20).Value = "S" Then
If Cells(x, 16).Value <> "M" And Cells(x, 16).Value <> "Mo" And Cells(x, 16).Value <> "S" Then
Cells(x, 11).Value = ""
End If
End If
End If
Next
Bookmarks