this solution will work as well:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim wb As Workbook
Dim ws As Worksheet
Set wb = ThisWorkbook
Set ws = wb.Sheets("Sheet3")
Dim keycells As Range
Set keycells = ws.Range("L18:L168")
Dim z As Long
With ws
If Not Intersect(keycells, Range(Target.Address)) Then
If Target.Value = "" Then
'hide row
z = 153 + Split(Target.Address, "$")(2)
Rows(z).Hidden = True
Else
'unhide row
z = 153 + Split(Target.Address, "$")(2)
Rows(z).Hidden = False
End If
End If
End With
End Sub
more code that what 6stringjazzer has but maybe this will work for you better.
so copy this and put it in the sheet code (sheet1, sheet2, etc)
Bookmarks