Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a couple of worksheets in the same workbook who needs to show
columns R:T and row 15 if the cell AE1 changes in 1 or 2 triggerd by a formula by a dropdown box in the mainsheet (input). The following code doesn't work. Why?? Sub DropDown_Change() 'hide or unhdide columns and row Dim sh As Worksheet For Each sh In Worksheets If sh.Name < "input" Then If sh.Range("Ae1").Value = 2 Then Columns("P:R").Select Selection.EntireColumn.Hidden = True Rows("15:15").Select Selection.EntireRow.Hidden = True ElseIf sh.Range("Ae1").Value = 1 Then Rows("15:15").Select Selection.EntireRow.Hidden = False Columns("p:r").Select Selection.EntireColumn.Hidden = False End If End If Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide Columns based on a cell value | Excel Worksheet Functions | |||
Hide columns if specific cell is blank? | Excel Discussion (Misc queries) | |||
Hide or Unhide certain columns based on a cell value | Excel Programming | |||
Hide all columns that span a merged cell? | Excel Programming | |||
How do I automatically hide columns in a worksheet based on a cell value? | Excel Worksheet Functions |