Thread: [Solved] Hide Row With Zero Values
View Single Post
 
Old 03-18-2020, 07:08 AM
Marcia's Avatar
Marcia Marcia is offline Windows 7 32bit Office 2013
Expert
 
Join Date: May 2018
Location: Philippines
Posts: 553
Marcia has a spectacular aura aboutMarcia has a spectacular aura aboutMarcia has a spectacular aura about
Default

Thank you. I inserted a line that I copied from the link for the selection of sheets then I got this error message.
Quote:
Sub HideZeroValueRows()
Dim ws As Worksheet, rng As Range, cel As Range
For Each ws In ThisWorkbook.Sheets
Select Case ws.Name
Case Is = "TB..GF 101", "TB..GF 20%", "TB..SEF", "TB..REG TF"
End Select
Set rng = ws.Range("EG9", ws.Cells(Rows.Count, "EH").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