I have been using the macro below to hide rows in a spreadsheet when the result is 0. Is there a way to have the macro unhide cells in column F that have changed from a 0 to a number at the same time?
Sub hide_rows()
Dim i As Long, lrow As Long
Application.ScreenUpdating = False
With Worksheets("Sheet1")
lrow = .Range("f" & .Rows.Count).End(xlUp).Row
For i = 11 To lrow
If .Range("f" & i).Value = "0" Then .Rows(i).Hidden = True
Next i
End With
Application.ScreenUpdating = True
'uncomment following line if you want to return to automatic calculation
'Application.Calculation = xlCalculationAutomatic
End Sub
Thanks for your help!!
Bookmarks