Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to hide/unhide WS based upon WS tab color Joe M. Excel Discussion (Misc queries) 1 April 8th 10 07:28 PM
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
Hide/unhide specific cells based on the dropdown list value Sam Kuo Excel Programming 1 January 7th 07 06:16 PM
Multiple Drop Down Boxes to Hide/Unhide Row DtTall Excel Programming 1 November 16th 06 08:53 AM
Macro to hide and unhide based on criteria [email protected] Excel Discussion (Misc queries) 1 June 5th 06 08:05 PM


All times are GMT +1. The time now is 09:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"