Here's another bit of help I need
I have part of a macro that deletes certain rows of a spreadsheet, ie where it finds cells in col C in which the data starts with a "1" and deletes the whole row.
I now need it to delete more rows, based on 2 more conditions, ie where the data in Col C starts with a "0" or a "2".
I realise I could just copy / paste that code and change the "1" for a "0" and a "2", but I suspect there's a neater way of doing it (using two "or" commands?) I've had a play with it but I just get errors, or nothing
Here's the current code:
I'm sure you guys / gals will have a simple solution!! LOL![]()
'Removes any rows with cell data in Col C beginning with "1" (these would be MTS Website shipments) Dim lngLastRow As Long, lngRow As Long With Application .ScreenUpdating = False .Calculation = xlCalculationManual End With lngLastRow = Range("A" & Rows.Count).End(xlUp).Row For lngRow = lngLastRow To 2 Step -1 If Left(Range("C" & lngRow), 1) = "1" Then Rows(lngRow).Delete Next lngRow With Application .Calculation = xlCalculationAutomatic .ScreenUpdating = True End With
Kindest regards
Mike
Bookmarks