I have this code that does the job but can be slow as it's looping. Goes through 4000 lines.
Is there a faster solution - sure there is?
Is there a faster solution - sure there is?
Code:
Sub HideBudgetRows()
Dim cel As Range
Dim rng As Range
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Set rng = Sheets("Budget").Range("A10", Range("EndOfBudgetRange"))
For Each cel In rng
If cel.Value = 0 Then
cel.EntireRow.Hidden = True
End If
Next cel
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub