Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("C16")) Is Nothing Then Exit Sub
Rows("51:100").RowHeight = 0
Select Case Target.Value
Case 11 To 20
Rows("51:60").AutoFit
Case 21 To 30
Rows("61:70").AutoFit
Case 31 To 40
Rows("71:80").AutoFit
Case 41 To 50
Rows("81:90").AutoFit
Case 51 To 60
Rows("91:100").AutoFit
End Select
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Sht As Worksheet
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Range("C16")) Is Nothing Then Exit Sub
Set Sht = Sheets("Sheet2")
With Sht
.Rows("51:100").RowHeight = 0
Select Case Target.Value
Case 11 To 20
.Rows("51:60").AutoFit
Case 21 To 30
.Rows("61:70").AutoFit
Case 31 To 40
.Rows("71:80").AutoFit
Case 41 To 50
.Rows("81:90").AutoFit
Case 51 To 60
.Rows("91:100").AutoFit
End Select
End With
End Sub