Try this. Adapted from some code by Mr Andrew Poulsom
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$P$2" Then Exit Sub
.Columns("O").Hidden = Target.Value = 4
The code needs to go in the worksheet module
1) Copy the code that you want to use
2) Select the worksheet in which you the code to run
3) Right click on the sheet tab and choose View Code, to open the Visual Basic Editor.
4) Where the cursor is flashing, choose Edit | Paste
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("P2").Value = "4" Then
Range("O2").EntireColumn.Hidden = True
If Range("P2").Value <> "4" Then
Range("O2").EntireColumn.Hidden = False
Note: this does have to be put into the worksheet module you want this to run on.
Yes...It's just ugly and in the way when not being used during a regular "4 week" month...I will just manually hide it - I have also used the If Then formula to return blanks when not being used - this helps clean it up a bit.