Good morning!
I am trying to get this macro to fire when the value in cell F31 changes. The macro hides and un-hides specific rows based on the value in F31. F31 values are changed by a pull down menu. I'm trying to hide all values not pertaining to the choice made from the pull down regarding roof slope. I did insert the code in the worksheet where the pull down makes the changes. I change the values in F31 and nothing happens. I would greatly appreciate any input or suggestions regarding how to get this working.
Thanks very much for any help you could render
Bill
I am trying to get this macro to fire when the value in cell F31 changes. The macro hides and un-hides specific rows based on the value in F31. F31 values are changed by a pull down menu. I'm trying to hide all values not pertaining to the choice made from the pull down regarding roof slope. I did insert the code in the worksheet where the pull down makes the changes. I change the values in F31 and nothing happens. I would greatly appreciate any input or suggestions regarding how to get this working.
Thanks very much for any help you could render
Bill
Code:
Sub HideRows()
Sheets("QUICK QUOTE").Select
Rows.EntireRow.Hidden = False
If F31 = "4:12" Then
Rows("164:171").EntireRow.Hidden = False
Rows("173:234").EntireRow.Hidden = True
If F31 = ("5:12") Then
Rows("173:180").EntireRow.Hidden = False
Rows("164:172").EntireRow.Hidden = True
Rows("181:234").EntireRow.Hidden = True
If F31 = ("6:12") Then
Rows("182:189").EntireRow.Hidden = False
Rows("164:181").EntireRow.Hidden = True
Rows("190:234").EntireRow.Hidden = True
If F31 = ("7:12") Then
Rows("191:198").EntireRow.Hidden = False
Rows("164:190").EntireRow.Hidden = True
Rows("199:234").EntireRow.Hidden = True
If F31 = ("8:12") Then
Rows("200:207").EntireRow.Hidden = False
Rows("164:199").EntireRow.Hidden = True
Rows("208:234").EntireRow.Hidden = True
If F31 = ("9:12") Then
Rows("209:216").EntireRow.Hidden = False
Rows("164:208").EntireRow.Hidden = True
Rows("217:234").EntireRow.Hidden = True
If F31 = ("10:12") Then
Rows("218:225").EntireRow.Hidden = False
Rows("164:217").EntireRow.Hidden = True
Rows("226:234").EntireRow.Hidden = True
If F31 = ("12:12") Then
Rows("227:234").EntireRow.Hidden = False
Rows("164:226").EntireRow.Hidden = True
End If
End Sub