Hi Guys,
First I would like to thank you in advance- I know what a help this forum is and it has come to my rescue more times than I have had hot baths.
I am trying to use a macro on my excel sheet. And that lies my problem as I am relatively inexperienced with VBA.
My question- I have used a macro from this site http://excel.tips.net/T003283_Hiding...ell_Value.html) and adapted it for my sheet. See below)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D1").Value = 0 Then
Columns("H:Q").EntireColumn.Hidden = True
Else
Columns("H:Q").EntireColumn.Hidden = False
End If
End Sub
I would like to add another instance of this (see below)
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("R1").Value = 0 Then
Columns("S:V").EntireColumn.Hidden = True
Else
Columns("S:V").EntireColumn.Hidden = False
End If
End Sub
But when I paste it below it - it wont work?
Apologies for being ultra new!
Thanks in advance
Hernan
Bookmarks