Hi there,
I am using the below bit of code to hide columns based on a value. However it wont work and cant figure it out.
any ideas
Thanks
Chris
Sub Show_Team_1()
Application.ScreenUpdating = False
Sheets("Master Schedule").Visible = True
Sheets("Master Schedule").Select
Dim c As Range
Range("h9:bh9").EntireColumn.Hidden = False
For Each c In Range("h9:bh9")
If c = "1" Then
Else
Columns(c.Columns).EntireColumn.Hidden = True
End If
Next c
Application.ScreenUpdating = True
End Sub
I am using the below bit of code to hide columns based on a value. However it wont work and cant figure it out.
any ideas
Thanks
Chris
Sub Show_Team_1()
Application.ScreenUpdating = False
Sheets("Master Schedule").Visible = True
Sheets("Master Schedule").Select
Dim c As Range
Range("h9:bh9").EntireColumn.Hidden = False
For Each c In Range("h9:bh9")
If c = "1" Then
Else
Columns(c.Columns).EntireColumn.Hidden = True
End If
Next c
Application.ScreenUpdating = True
End Sub