Hello. below are two different macros I have tried to accomplish my task of hiding and unhiding rows based on values given in a drop down list. The macros work in hiding the rows when they are empty but not unhiding them/re-hiding them when the the drop down list reflects a value...
Here are the two different macros.. I hope somebody can help me...
Macro 1:
If [E2].Value = "" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "NAS" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "CARD" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "RETAIL" Then
Range ("A3:I3").EntireRow.Hidden = False
End If
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
If [E2].Value = "" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "RETAIL" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "CARD" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "NAS" Then
Range ("A2:L2").EntireRow.Hidden = False
End If
End Sub
Macro 2 in place of macro 1... Same Results..
Sub channel()
Range("A3:I3").EntireRow.Hidden = [E2].Value = ""
Range("A4:I4").EntireRow.Hidden = [E2].Value = ""
End Sub
Macro #2 takes out the IF statements but I need those based on the options in the drop down list.
**NOTE this program is based on Excel 03
Here are the two different macros.. I hope somebody can help me...
Macro 1:
If [E2].Value = "" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "NAS" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "CARD" Then
Range("A3:I3").EntireRow.Hidden = True
End If
If [E2].Value = "RETAIL" Then
Range ("A3:I3").EntireRow.Hidden = False
End If
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
If [E2].Value = "" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "RETAIL" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "CARD" Then
Range("A4:I4").EntireRow.Hidden = True
End If
If [E2].Value = "NAS" Then
Range ("A2:L2").EntireRow.Hidden = False
End If
End Sub
Macro 2 in place of macro 1... Same Results..
Sub channel()
Range("A3:I3").EntireRow.Hidden = [E2].Value = ""
Range("A4:I4").EntireRow.Hidden = [E2].Value = ""
End Sub
Macro #2 takes out the IF statements but I need those based on the options in the drop down list.
**NOTE this program is based on Excel 03