1. Welcome to the Forum - suggest you take a look at the FAQs (in my sig)
2. I added CODE tags to format the macro for you - you can use the [#] icon to insert CODE tags and paste the macro between
3. No sure about the interplay between the two cells but something like this maybe on the code sheet for the worksheet
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim v As Variant
Dim r As Range
Dim Rows39_47 As Boolean
Set r = Target.Cells(1, 1)
If Len(r.Value) = 0 Then Exit Sub ' catch a Clear
If Not Application.Intersect(Range("B2"), Target) Is Nothing Then
Application.ScreenUpdating = False
Rows39_47 = Me.Rows("39:47").Hidden
Me.Rows.Hidden = False
Me.Rows("39:47").Hidden = Rows39_47
Select Case UCase(r.Value)
Case Is = "ACSA"
For Each v In Array(24, 25, 35, 36, 57, 58, 60)
Me.Rows(v).Hidden = True
Next
Case Is = "CSA"
For Each v In Array(57, 58, 60)
Me.Rows(v).Hidden = True
Next
Case Is = "ASA"
For Each v In Array(24, 25, 30, 31, 35, 36, 50, 57, 58, 59, 60)
Me.Rows(v).Hidden = True
Next
Case Is = "ACA"
For Each v In Array(24, 25, 30, 31, 35, 36, 50, 59, 60)
Me.Rows(v).Hidden = True
Next
Case Is = "SASA"
For Each v In Array(24, 25, 30, 31, 35, 36, 50, 57, 58, 59, 60)
Me.Rows(v).Hidden = True
Next
Case Is = "PLEASE SELECT ROLE CODE"
' empty for completeness
End Select
Application.ScreenUpdating = True
ElseIf Not Application.Intersect(Range("D38"), Target) Is Nothing Then
Application.ScreenUpdating = False
Select Case UCase(r.Value)
Case Is = "SELECT ANSWER"
Me.Rows("39:47").Hidden = False
Case Is = "YES"
Me.Rows("39:47").Hidden = True
Case Is = "NO"
Me.Rows("39:47").Hidden = False
Case Is = "NA"
Me.Rows("39:47").Hidden = True
End Select
Application.ScreenUpdating = True
End If
End Sub