A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data
To incorporate the option for "Dwellings including blocks of flats" in your code, you can use an "ElseIf" statement. Here's an example code that should work for your scenario:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("C4") = "Buildings other than dwellings" Then
Rows("10:18").EntireRow.Hidden = True
Rows("38:43").EntireRow.Hidden = True
Rows("84:87").EntireRow.Hidden = True
Rows("92:95").EntireRow.Hidden = True
Rows("103:109").EntireRow.Hidden = True
ElseIf Range("C4") = "Dwellings including blocks of flats" Then
Rows("20:28").EntireRow.Hidden = True
Rows("48:53").EntireRow.Hidden = True
Rows("99:102").EntireRow.Hidden = True
Rows("114:119").EntireRow.Hidden = True
Else
Rows("6:119").EntireRow.Hidden = False
End If
End Sub
In this code, if cell C4 contains "Dwellings including blocks of flats", it will hide rows 20 to 28, 48 to 53, 99 to 102, and 114 to 119. If cell C4 contains any other value or is blank, it will show all rows from 6 to 119.