Hi there! I would say that you could easily add a new Select...Case block but that would also need some tweaks to the If...Then logic and simply too many lines of code for my taste. I think this may be easy enough to follow but what's more, it simply works the way you've asked. Oh, by-the-way, this works on the sheet that is active so it can be moved from sheet to sheet or added to a module by itself and called on when needed.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
' Ignore text values
If Not IsNumeric(Target.Value2) Then Exit Sub
' Only reset Hidden if G15 or G16 are changed
If Target <> Range("G15") And Target <> Range("G16") Then Exit Sub
' Hide Columns
If Target.Value2 <= 9 And Target.Address = "$G$15" Then
' UnHide all columns
ActiveSheet.Columns.Hidden = False
' Hide required columns
Range(Cells(1, 10 + Target.Value2), Cells(1, 19)).EntireColumn.Hidden = True
End If
'Hide Rows
If Target.Value2 <= 9 And Target.Address = "$G$16" Then
' UnHide all rows
ActiveSheet.Rows.Hidden = False
' Hide required rows
Range(Cells(19 + Target.Value2 * 5, 1), Cells(64, 1)).EntireRow.Hidden = True
End If
End Sub
Cheers!
Bookmarks