Hi folks and Merry Christmas
I was hoping somebody could help me rewrite a code that is not acting like I hoped it should. I believe the code is case sensitive when I would like it not to be. This needs to be flexible because data I am screening can be inconsistent
The line of code is the "If" statement line
Thank you
I was hoping somebody could help me rewrite a code that is not acting like I hoped it should. I believe the code is case sensitive when I would like it not to be. This needs to be flexible because data I am screening can be inconsistent
The line of code is the "If" statement line
Thank you
VBA Code:
' Loop through each cell in the range
For i = lastColumn To 1 Step -1
' Check if the cell value contains "Up" or "Down" (regardless of case)
If InStr(1, Cells(1, i).Value, "UP") > 0 Or InStr(1, Cells(1, i).Value, "DOWN") > 0 Then
' If it does, hide the column
Columns(i).EntireColumn.Hidden = True
End If
Next i