F
FIRSTROUNDKO via OfficeKB.com
Hi,
I am stuck with the logic of the "OR" in this sub
whilst
If Cells(RowNdx, "A") <> "CAR" Then
works in the below sub
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A") <> "CAR" Then
Rows(RowNdx).Delete
End If
Next RowNdx
the replacement by
If Cells(RowNdx, "A") <> "CAR" OR Cells(RowNdx, "A") <> "BUS" Then
deletes everything
Thanks in advance
I am stuck with the logic of the "OR" in this sub
whilst
If Cells(RowNdx, "A") <> "CAR" Then
works in the below sub
Dim LastRow As Long
Dim RowNdx As Long
LastRow = Cells(Rows.Count, "B").End(xlUp).Row
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A") <> "CAR" Then
Rows(RowNdx).Delete
End If
Next RowNdx
the replacement by
If Cells(RowNdx, "A") <> "CAR" OR Cells(RowNdx, "A") <> "BUS" Then
deletes everything
Thanks in advance