I can see how hiding a row makes sense based on a value in that row.
But unhiding a row seems like a problem. How would the value change so that it
could change--maybe the result of a formula?
If changed by typing, right click on the worksheet tab that should have this
behavior and select view code. Then paste this into the code window.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("a:a")) Is Nothing Then Exit Sub
If lcase(Target.Value) = "hide me" Then
Target.EntireRow.Hidden = True
Else
Target.EntireRow.Hidden = False
End If
End Sub
Adjust the range (I used column A). And adjust the value to check for.
If the cell changes because of a calculation, you could use this:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Intersect(Target, Me.Range("a:a")) Is Nothing Then Exit Sub
If Target.Value = "Hide me" Then
Target.EntireRow.Hidden = True
Else
Target.EntireRow.Hidden = False
End If
End Sub
This is also a worksheet event. Use the same rightclick on the worksheet tab to
set this up.
======
Personally, I think I'd apply Data|Filter|autofilter.
It wouldn't be automatic, but I could use it whenever I wanted and I could use
it for many more things.