Steve_CDHB
New Member
- Joined
- Jun 25, 2012
- Messages
- 3
Hi everyone,
I currently have the looping process below that checks for values in column E = 0 and if true hides the row.
Have done some error checking and the time hungry piece of code is "a.EntireRow.Hidden = (a.Value = 0)"
Is there a simple way to build a selection which has multiple rows and then hide the entire selection at once to speed this process up?
Sub HideBlankRows()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim a As Range, s As String
s = "e3:e728" 'The range to check on each sheet
ThisWorkbook.Worksheets("Staffing Tool").Select
For Each a In Range(s)
a.EntireRow.Hidden = (a.Value = 0)
Next a
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Thanks in advance to anyone that can assist with my problem.
I currently have the looping process below that checks for values in column E = 0 and if true hides the row.
Have done some error checking and the time hungry piece of code is "a.EntireRow.Hidden = (a.Value = 0)"
Is there a simple way to build a selection which has multiple rows and then hide the entire selection at once to speed this process up?
Sub HideBlankRows()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim a As Range, s As String
s = "e3:e728" 'The range to check on each sheet
ThisWorkbook.Worksheets("Staffing Tool").Select
For Each a In Range(s)
a.EntireRow.Hidden = (a.Value = 0)
Next a
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Thanks in advance to anyone that can assist with my problem.