I use the following code to delete columns that are blank in row 4.
With Sheets("SheetTemp")
For i = 81 To 21 Step -1
If IsEmpty(.Cells(4, i)) Or .Cells(4, i) = "" Then
.Cells(4, i).EntireColumn.Delete
End If
Next
It works beautifully. However, I would like to modify it to delete columns if that same row contains the word "month".
I've tried several ways, including the following code, to no avail. Any suggestions would be appreciated.
With Sheets("SheetTemp")
For i = 81 To 21 Step -1
If IsEmpty(.Cells(4, i)) Or .Cells(4, i) = "*month*" Then
.Cells(4, i).EntireColumn.Delete
End If
Next
Thanks,
RL
Bookmarks