Hello everyone,
I have a particular problem with a worksheet I am working on at the moment, basically if row 5 has a 0 displayed I want that column to hide, but if row 5 has text of any value displayed I want it to unhide, the range is E5 to BA5 across.
I have draft VBA code as follows:
Sub HideColumn()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For a = 0 To 50
If Range("E5").Offset(0, a).Value = "Hide Column" Then Range("E5").Offset(0, a).EntireColumn.Hidden = True
Next a
Application.ScreenUpdating = True
End Sub
This works to an extent in that it will hide the columns with the 0 displayed, but when I unhide them the word TRUE is input in other blank cells, and also if text is input for the hidden rows they do not unhide...
Bookmarks