A Macro to run depending on Cell Input

Microsoft Excel 2003 (full product)
January 18, 2011 at 04:30:34
Specs: Windows XP
I have inserted in A1 a drop down list where you can either select Yes or No, i want to run a macro to unhide rows 7:11 is yes is selected and rehide them if No is selected. Can any help me write a macro to achieve this.

thanks

fay


See More: A Macro to run depending on Cell Input

Report •

#1
January 18, 2011 at 05:51:18
On the sheet in question's Macro sheet, add the following:
Private Sub Worksheet_Change(ByVal Target As Range)
  [7:11].EntireRow.Hidden = [A1] <> "Yes"
End Sub

How To Ask Questions The Smart Way


Report •
Related Solutions


Ask Question