Good Afternoon,
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.
This may be impossible.
My wish is that the user would be able to select "Yellow" or "Red" and then be presented with the sub-categories (this part does work, based on selection in A10,
AND then be able to select B11 from green to yellow or red and then, in this example B12 would "unhide" and provide written help.
The code is longer, but repetitive. (does same action for each set of 7 rows)
Thank you,
V/R Joe
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.
This may be impossible.
My wish is that the user would be able to select "Yellow" or "Red" and then be presented with the sub-categories (this part does work, based on selection in A10,
AND then be able to select B11 from green to yellow or red and then, in this example B12 would "unhide" and provide written help.
The code is longer, but repetitive. (does same action for each set of 7 rows)
Thank you,
V/R Joe
Code:
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
Attachments
Last edited by a moderator: