Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unhide/hide based on drop down list
I have a cell with a drop down list (using data validation, list) and it has
3 values in it: High, Medium and Low. If the user chooses "Low", the following 3 rows remain hidden. If the user chooses "Medium" or High", the following 3 rows need to unhide so they can explain their reasoning. I am new to macros, but found this macro that worked if I had only 2 choices on the list: Sub HideRows() Dim Rng As Range Set Rng = Sheets("Sheet1").Range("A3") If Rng.Value = "High" Then Rows("4:6").EntireRow.Hidden = False Range("A9").Select ElseIf Rng.Value = "Low" Then Rows("4:6").EntireRow.Hidden = True Range("A9").Select End If End Sub What I want is a macro that will work with 3 choices (actually 4 - also hide if blank), and is live, so that if the user chooses low at first, but then comes back later and chooses high, the rows will unhide then. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to hide/unhide WS based upon WS tab color | Excel Discussion (Misc queries) | |||
Hide or unhide sheets based on cell | Excel Discussion (Misc queries) | |||
Hide/unhide specific cells based on the dropdown list value | Excel Programming | |||
Multiple Drop Down Boxes to Hide/Unhide Row | Excel Programming | |||
Macro to hide and unhide based on criteria | Excel Discussion (Misc queries) |