Good Afternoon,
I found help here (many times)
Currently I have a Spreadsheet that will expand (unhide rows) based on a color selection in column "a". That part work GREAT (see lines 3-7) of code below. I am attempting to see if i can add a layer (for future requests). My attempt (one of them) to hide row B12 based on selection in B11 does not work as expected. to be fair I did not think it would, I assume the first part of the sub is cancelling out what I would like to do with the B11/B12.
The code is longer, but repetitive. (does same action for each set of 7 rows)
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("$A10:A100")) Is Nothing Then
If Range("A10").Value = "GREEN" Then
Rows("11:16").EntireRow.Hidden = True
Else
Rows("11:16").EntireRow.Hidden = False
End If
If Range("B11").Value = "GREEN" Then
Rows("12").EntireRow.Hidden = True
Else
Rows("12").EntireRow.Hidden = False
End If
End Sub
I found help here (many times)
Currently I have a Spreadsheet that will expand (unhide rows) based on a color selection in column "a". That part work GREAT (see lines 3-7) of code below. I am attempting to see if i can add a layer (for future requests). My attempt (one of them) to hide row B12 based on selection in B11 does not work as expected. to be fair I did not think it would, I assume the first part of the sub is cancelling out what I would like to do with the B11/B12.
The code is longer, but repetitive. (does same action for each set of 7 rows)
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("$A10:A100")) Is Nothing Then
If Range("A10").Value = "GREEN" Then
Rows("11:16").EntireRow.Hidden = True
Else
Rows("11:16").EntireRow.Hidden = False
End If
If Range("B11").Value = "GREEN" Then
Rows("12").EntireRow.Hidden = True
Else
Rows("12").EntireRow.Hidden = False
End If
End Sub