have you though of the implications of this? this means in other words
that if the value is fixed and not from a formula than even if you use
the menus to unhide the row, it will automatically hide again once it
is un hidden ... ?
if this is really what you wish to do and have thought the thing out
right i might have a solution.
If you really want that, put this in the worksheet code module
(right-click the worksheet tab and choose View Code):
Private Sub Worksheet_Calculate()
Dim rRow As Range
Application.EnableEvents = False
For Each rRow In Me.UsedRange.Rows
With rRow
.Hidden = Application.CountIf(.Cells, 0)
End With
Next rRow
Application.EnableEvents = True
End Sub
Every time the sheet calculates, each row will be evaluated for a cell
containing zero. If one is found, the row will be hidden.
The OP didn't indicate that s/he wanted to specify a column. S/he said
"I want to automatically hide a row when the value of one of it's (sic)
cells is zero."
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.