Hi I am looking to see what I am doing wrong.
I have an excel template which I want to open in stages based on formulated answers. i.e E17, E26
The formulated field outputs an answer based on Yes/No scoring in other cells.
However, when the answer formulates when all questions answered the rows do not hide/unhide. I can get it working on dropdown list but really need it to calculate based on the formulated answer.
Any ideas where I am going wrong??
Code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target.Row = 17 And Target.Value = "Non Significant Change - Minor Local Governance applies" Then
Rows("1:18").EntireRow.Hidden = False
Rows("19:28").EntireRow.Hidden = True
Rows("29").EntireRow.Hidden = False
Rows("30").EntireRow.Hidden = True
Rows("31:121").EntireRow.Hidden = False
Rows("122:128").EntireRow.Hidden = True
Rows("129").EntireRow.Hidden = False
Rows("130:301").EntireRow.Hidden = True
ElseIf Target.Column = 5 And Target.Row = 17 And Target.Value = "Significant Change - complete the additional materiality questions below" Then
Rows("1:17").EntireRow.Hidden = False
Rows("18").EntireRow.Hidden = True
Rows("19:26").EntireRow.Hidden = False
Rows("27:301").EntireRow.Hidden = True
ElseIf Target.Column = 5 And Target.Row = 26 And Target.Value = "Significant Non Material [Standard]" Then
Rows("1:17").EntireRow.Hidden = False
Rows("18").EntireRow.Hidden = True
Rows("19:27").EntireRow.Hidden = False
Rows("28:29").EntireRow.Hidden = True
Rows("30:82").EntireRow.Hidden = False
Rows("83:98").EntireRow.Hidden = True
Rows("99:121").EntireRow.Hidden = False
Rows("122:128").EntireRow.Hidden = True
Rows("129:300").EntireRow.Hidden = False
Rows("301").EntireRow.Hidden = True
ElseIf Target.Column = 5 And Target.Row = 26 And Target.Value = "Significant Change - Material" Then
Rows("1:17").EntireRow.Hidden = False
Rows("18").EntireRow.Hidden = True
Rows("19:26").EntireRow.Hidden = False
Rows("27").EntireRow.Hidden = True
Rows("28").EntireRow.Hidden = False
Rows("29").EntireRow.Hidden = True
Rows("30:82").EntireRow.Hidden = False
Rows("83:98").EntireRow.Hidden = True
Rows("99:121").EntireRow.Hidden = False
Rows("122:128").EntireRow.Hidden = True
Rows("129").EntireRow.Hidden = False
Rows("300").EntireRow.Hidden = True
Rows("301").EntireRow.Hidden = False
End If
End Sub
Display More