So I have several sheets that hide and unhide rows based on the word "unhide" in a cell.
The code I use is below, it seams to run very very slowly, is there a faster alternative to this?
Basically it takes a sheet, looks at each cell from 5 to 32 and hides or unhides based on the word "unhide" then it goes to the next sheet. Just takes forever.
Sub DGS_Look()
Dim vWShts As Variant
Dim rCell As Range
Sheets("Controls - Analyst").Range("G9") = "Total D&GS"
vWShts = Array("1.0 Orders", "O ACC", "2.0 Revenue", "R ACC", "3.0 Earnings", "E ACC", "4.0 Margin", "5.0 Cash", "C ACC", "5.1 Receipts", "Rec ACC", "5.2 Expenditures", "Exp ACC", "6.0 EP", "7.0 RONA", "8.0 Net Assets")
For i = 0 To UBound(vWShts)
With Worksheets(vWShts(i))
Sheets(vWShts(i)).Select
For Each rCell In Range("AS5:AS32")
rCell.EntireRow.Hidden = (rCell.Value <> "UNHIDE")
Next rCell
End With
Next i
Sheets("Controls - Analyst").Select
End Sub
Bookmarks