Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I want to Hide a range of rows (16:18 in this example) if "no" is in a range
of cells and Unhide the same range of rows if "yes" is in the same range of cells. The "Hide", "Unhide" macros (below) work if I select one from the Run Macro list, of course. But, how can I call for it to run from an "IF" function. I know this statement is wrong, but it may help you know what I am looking for: =IF (A1:A15="no",Run Hide,IF (A1:A15="yes",Run Unhide),"") Sub Hide() ' ' Hide Macro ' Rows("16:18").Select Selection.EntireRow.Hidden = True End Sub ___________________ Sub Unhide() ' ' Unhide Macro ' Rows("16:18").Select Selection.EntireRow.Hidden = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Restarting a macro | Excel Worksheet Functions | |||
Function triggering a macro | Excel Worksheet Functions | |||
Running a macro for each item in an Autofilter list | Excel Discussion (Misc queries) | |||
How to CANCEL file SAVE PROMPT when MACRO is running? | Excel Discussion (Misc queries) | |||
Function Macro for Nested IF | Excel Worksheet Functions |