I have a macro that currently deletes blank rows in column A and then a few unnecessary columns E and G. The report has changed on me and now in column E I must delete all the locations that begin with "MX " and there is just too many to be selecting one by one. Is there anything I can add to this current macro to delete all Locations that begin with "MX "? there are many other prefixes such as "US" "CA" but the one I need to delete are "MX" the whole row where the MX is found in column E needs to be deleted...
Sub Delete()
Dim cRow As Long
cRow = 3
Do While (IsEmpty(Cells(cRow, 1)))
cRow = cRow + 1
Loop
cRow = cRow - 1
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
if range("E" & cRow).value like "MX*" then 'OR left(range("E" & cRow).value, 2) = "MX"
Rows("3:" & cRow).Delete Shift:=xlUp
end if
End Sub
Bookmarks