[COLOR="Blue"]Sub[/COLOR] Visi()
[COLOR="Blue"]Dim[/COLOR] rng [COLOR="Blue"]As[/COLOR] Range, lastRow [COLOR="Blue"]As[/COLOR] [COLOR="Blue"]Long[/COLOR]
[COLOR="Blue"]With[/COLOR] Sheets("Sheet1")
[COLOR="SeaGreen"] ' Define last row in data. I have chosen column A.[/COLOR]
lastRow = .Range("A6").End(xlDown).Row
[COLOR="seagreen"] ' Turn off autofilter, if any.[/COLOR]
[COLOR="Blue"]If[/COLOR] .AutoFilterMode [COLOR="Blue"]Then[/COLOR] .AutoFilter.Range.AutoFilter
[COLOR="seagreen"] ' Filter data by room.[/COLOR]
.Range("A6:M6").AutoFilter Field:=2, Criteria1:=12
[COLOR="seagreen"] ' Copy cell we're interested in.[/COLOR]
[COLOR="Blue"]Set[/COLOR] rng = .Range("C7:C" & lastRow).SpecialCells(xlCellTypeVisible)
[COLOR="Blue"]If[/COLOR] [COLOR="Blue"]Not[/COLOR] rng [COLOR="Blue"]Is Nothing Then[/COLOR]
rng.Copy
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]If[/COLOR]
[COLOR="seagreen"] ' Turn off autofilter, if any.[/COLOR]
[COLOR="Blue"]If[/COLOR] .AutoFilterMode [COLOR="Blue"]Then[/COLOR] .AutoFilter.Range.AutoFilter
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]With[/COLOR]
[COLOR="Blue"]End[/COLOR] [COLOR="Blue"]Sub[/COLOR]