Hi,

Im looking for some assitance in writing some code. I am very new at this so sorry if my question seems basic and easy but I have no idea where to start. Basically I am looking at writing code which does the following:

If A1 = 1 then hide rows 3:10, 11, 15, 19, 20:50 etc

If A1 = 2 then hide rows 3:10, 15, 29:52, 82

If A1 = 3 then hide rows 3:20, 95

If A1 = 4 then hide rows 8:10, 12, 14, 16, 18, 20, 22, 24:60

Now im able to get the first code which I have written as:

Private Sub Worksheet_Change(ByVal Target As Range)

If Range("A1") = 1 Then
Rows("3:10").EntireRow.Hidden = True
Rows("11").EntireRow.Hidden = True
Rows("15").EntireRow.Hidden = True
Rows("19").EntireRow.Hidden = True
Rows("20:50").EntireRow.Hidden = True


End If

End Sub

But as soon as I write the same again chaning 1 to 2, it seems to contridict itself and does nothing. Any help would be greatly appreciated as I really dont know what im doing lol.

Thanks

James