What I'm Trying To Do: Use a Macro to Delete entire columns if any cell in that column contains a specific value.
My Problem: My list of values has grown. I need a way to say "If Cell Contains "02P" OR "03P" OR "04P" OR etc..."
Below is my code. It works great, but given the number of values I now have, I would have to edit and paste this code about 50 times. Is there a way to simplify it?
-----------------------
Dim rng As Range
Dim what As String
what = "02P"
Do
Set rng = ActiveSheet.UsedRange.Find(what)
If rng Is Nothing Then
Exit Do
Else
Column(rng.Column).Delete
End If
Loop
------------------------
Thanks!
Bookmarks