Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Conditional Hide/Unhide Rows
I am working with a workbook that has one worksheet only. I want all rows
visible when the user opens the file. However, In cell B10, I have a drop-down list I'm generating with data validation. The only values are YES or NO, and YES is initially selected. If the user selects YES, then I want the entire worksheet to remain visible. If the user selects NO, then I want to hide rows 11 through 50, and display an error message entered in row 51. Using previous posts, I've begun the code, but I know it's missing some things. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$10" And Target.Value = "YES" Then Range("B11").Select ElseIf Target.Address = "$B$10" And Target.Value = "NO" Then Rows("11:50").Select Selection.EntireRow.Hidden = True Range("A51").Select End If End Sub Any help you can give me would be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count Rows with Conditional Format? | Excel Discussion (Misc queries) | |||
Help using Conditional Formating of Entire Rows | Excel Worksheet Functions | |||
Conditional Sum Rows | Excel Worksheet Functions | |||
Copy conditional formatting across multiple rows? | Excel Discussion (Misc queries) | |||
How do I use conditional formatting for multiple rows? | Excel Worksheet Functions |