Hi,
I am working with a set of data in 2007 excel where I am only looking for the rows in which the cell in column A contains somewhere in the text either "reports" or "insights/" (quotes are not part of it). I am looking to have all other cells deleted. Right now I have this code for excel vba:
Sub RemoveRows()
Dim LR As Long, i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = LR To 2 Step -1
If Not Range("A" & i).Value Like "*reports*" Then Rows(i).Delete
Next i
End Sub
My problem is that it currently only works for reports, and deletes everything else, but I would like it to also keep insights/ as well. If anyone can modify this code, or offer a completely different code that will get the job done I would really apperiacte it.
Bookmarks