title: Combining two small scripts in VBA for Excel
body: <p>I am a VBA novice, and have two small scripts that both work independently, but I am unable to get them both working at the same time (because I'm not sure how to do it!)</p>
  
  <p>Script 1:</p>
  
  <pre><code>Option Explicit
  Private Sub Worksheet_Change(ByVal Target As Range)
  
      If Intersect(Target, Range("AE49")) Is Nothing Then Exit Sub
  
      Select Case Target.Value
         Case 1
            Range("A50:A52").EntireRow.Hidden = False
            Range("A53:A55").EntireRow.Hidden = True
         Case 2
            Range("A50:A53").EntireRow.Hidden = False
            Range("A54:A55").EntireRow.Hidden = True
         Case 3
            Range("A50:A54").EntireRow.Hidden = False
            Range("A55").EntireRow.Hidden = True
         Case 4
            Range("A50:A55").EntireRow.Hidden = False
      End Select
  End Sub
  </code></pre>
  
  <p>Script 2:</p>
  
  <pre><code>Option Explicit
  Private Sub Worksheet_Change(ByVal Target As Range)
  
      If Intersect(Target, Range("AE25")) Is Nothing Then Exit Sub
  
      Select Case Target.Value
         Case 1
            Range("A26:A28").EntireRow.Hidden = False
            Range("A29:A35").EntireRow.Hidden = True
         Case 2
            Range("A26:A29").EntireRow.Hidden = False
            Range("A30:A35").EntireRow.Hidden = True
         Case 3
            Range("A26:A30").EntireRow.Hidden = False
            Range("A31:A35").EntireRow.Hidden = True
         Case 4
            Range("A26:A31").EntireRow.Hidden = False
            Range("A32:A35").EntireRow.Hidden = True
         Case 5
            Range("A26:A32").EntireRow.Hidden = False
            Range("A33:A35").EntireRow.Hidden = True
         Case 6
            Range("A26:A33").EntireRow.Hidden = False
            Range("A34:A35").EntireRow.Hidden = True
         Case 7
            Range("A26:A34").EntireRow.Hidden = False
            Range("A35").EntireRow.Hidden = True
         Case 8
            Range("A26:A35").EntireRow.Hidden = False
      End Select
  End Sub
  </code></pre>
  
  <p>I have these loaded directly into the 'View Code' bit of the VBA Editor, as I don't know how to use modules.</p>
  
  <p>I also want another script that will unhide row 41 if the value of Z40 is either PowerPoint or Verbal, and will hide row 41 if the value of Z40 is None.</p>
  
  <p>Thank you all!</p>