Hello,
This code hides rows if the cells in the range are blank; but if a formula makes the cell value is = 0, it does not. Any suggestions?
Thank you.
This code hides rows if the cells in the range are blank; but if a formula makes the cell value is = 0, it does not. Any suggestions?
Code:
Sub Button1_Click()
Dim rng As Range, cell As Range
Set rng = Range("B4:B20")
For Each cell In rng
If Application.CountA(cell) = 0 Then cell.EntireRow.Hidden = True
Next
End Sub