79075404

Date: 2024-10-10 16:49:04
Score: 0.5
Natty:
Report link

Just reverse the logic/condition in IF clause

Private Sub TestIF()
Dim m2 As Integer, MyLastRow2 As Integer
MyLastRow2 = 7
For m2 = 2 To MyLastRow2
        If Not (Worksheets("CRE ATW").Cells(m2, "E").Value = "Signalling" Or _
            Worksheets("CRE ATW").Cells(m2, "E").Value = "Telecoms") Then
                 Worksheets("CRE ATW").Cells(m2, "A").ClearContents
        End If
Next m2
End Sub

Thank you.

Reasons:
  • Blacklisted phrase (0.5): Thank you
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Abu Ben Reaz