The posts so far have been regarding deleting rows with specific text, eg. "Record Only". I want to delete rows which contain the text specified in another cell, so that a user can change the text in that cell without having to edit the macro. For example, cell L5 on a tab called “Lookup”, The user can change the contents from “Blue” to “Red” and the next time it is run, the rows with “Red” will be deleted.
Why does the below find no rows to be deleted? What would work?
Last = Cells(Rows.Count, "V").End(xlUp).Row
For i = Last To 1 Step -1
If (Cells(i, "V").Value) = "=’Lookup’!L5" Then
Cells(i, "A").EntireRow.delete
End If
Next i