Raddrummer
11-10-2008, 11:45 AM
Hi Everyone,
A week or so ago I posted the following question: "I want to have Excel hide or unhide columns L:O based on the what integer the user puts into cell Q4." XLD was gracious to send me the event code shown below.
A recent revision has changed cell Q4 from a user input value to a calculated one. So my question is now: How can I modify the code below to work based on the result of the calcuation?
Thanks.
Current VBA Code:
Sub ShowHide()
If (Range("Q4") >= 0.75) And (Range("Q4") < 1) Then
Columns("l:o").Select
Selection.EntireColumn.Hidden = False
Else: Columns("l:o").Select
Selection.EntireColumn.Hidden = True
End If
End Sub
A week or so ago I posted the following question: "I want to have Excel hide or unhide columns L:O based on the what integer the user puts into cell Q4." XLD was gracious to send me the event code shown below.
A recent revision has changed cell Q4 from a user input value to a calculated one. So my question is now: How can I modify the code below to work based on the result of the calcuation?
Thanks.
Current VBA Code:
Sub ShowHide()
If (Range("Q4") >= 0.75) And (Range("Q4") < 1) Then
Columns("l:o").Select
Selection.EntireColumn.Hidden = False
Else: Columns("l:o").Select
Selection.EntireColumn.Hidden = True
End If
End Sub