Thread: [Solved] Hide Row With Zero Values
View Single Post
 
Old 03-17-2020, 06:07 AM
NoSparks NoSparks is offline Windows 10 Office 2010
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

another possibility
Code:
Sub HideZeroValueRows()
    Dim ws As Worksheet, rng As Range, cel As Range
    For Each ws In ThisWorkbook.Sheets
        Set rng = ws.Range("H3", ws.Cells(Rows.Count, "I").End(xlUp).Offset(-1))
        For Each cel In rng
            If cel.HasFormula And cel.Value = 0 Then cel.EntireRow.Hidden = True
        Next cel
    Next ws
End Sub
Reply With Quote