Hello All,
I'm using the attached code (thanks to someone on this site) to delete a column based on whether a set characters exist in row 2. This currently looks for the letters "FP1". How would I make this work to look for FP1, FP2, FP3, FP4. I don't want to look for all of them, just one, so if any of them exist, delete the column.
tx
E.
Sub Clear_Cleanup()
Dim delFIND As Range
On Error Resume Next
With ActiveSheet
Set delFIND = .Rows(2).Find("FP1", LookIn:=xlValues, LookAt:=xlWhole)
If Not delFIND Is Nothing Then
Do
.Columns(delFIND.Column).Delete xlShiftToLeft
Set delFIND = .Rows(2).Find("FP1", LookIn:=xlValues, LookAt:=xlWhole)
Loop Until delFIND Is Nothing
End If
End With
End Sub
Bookmarks