I want in Excel (2003) to take an imported data dump and format it into a report. Most of what I have done has involved recording a macro and then customizing the code where ne
I'm all about brevity.
Sub DeleteRowBasedOnCriteria()
Dim RowToTest As Long
For RowToTest = Cells(Rows.Count, 4).End(xlUp).Row To 2 Step -1
With Cells(RowToTest, 4)
If .Value <> "VFIRE" _
And .Value <> "ILBURN" _
And .Value <> "SMOKEA" _
And .Value <> "ST3" _
And .Value <> "TA1PED" _
And .Value <> "UN1" _
Then _
Rows(RowToTest).EntireRow.Delete
End With
Next RowToTest
End Sub