Sub a()
If Range("D3").Value = "Year 1" Then
  Rows("39:179").Select
  Selection.EntireRow.Hidden = True
End If
If Range("D3").Value = "Year 5" Then
  Rows("5:143").Select
  Selection.EntireRow.Hidden = True
End If
End Sub
You can add the others options