title: VBA code to hide/unhide multiple rows in another worksheet based on cell output from another worksheet
body: <p>I want to use VBA code for the following: based on a cell output (either "TRUE" or "FALSE" in cell W20, which changes based on whether a user checks a box or not), I want rows to be hidden/unhidden on another worksheet called "Analysis" worksheet based on the code below. I right clicked the "Summary" tab where cell W20 and the checkbox are located -> view code -> wrote the code below, but it's not working. I am very new to VBA, please help, it would be very appreciated, thanks in advance</p>
  
  <pre><code>Sub Worksheet_Change(ByVal Target As Range)
  
  Set Target = Range("$W$20")
  If Target.Value = "FALSE" Then
      Sheets("Analysis").Rows("54:55").EntireRow.Hidden = True
  Else
      Sheets("Analysis").Rows("54:55").EntireRow.Hidden = False
  End If
  If Target.Value = "FALSE" Then
      Sheets("Analysis").Rows("94:95").EntireRow.Hidden = True
  Else
      Sheets("Analysis").Rows("94:95").EntireRow.Hidden = False
  End If
  If Target.Value = "FALSE" Then
      Sheets("Analysis").Rows("134:135").EntireRow.Hidden = True
  Else
      Sheets("Analysis").Rows("134:135").EntireRow.Hidden = False
  End If
  End If
  End Sub
  </code></pre>