Quote Originally Posted by Paul_Hossler View Post
1. I changed your VLookup()s

2. In the Magestrate code page.


Option Explicit

Private Sub Worksheet_Calculate()
    Dim i As Long
    Application.EnableEvents = False
    For i = 18 To 20
        Rows(i).Hidden = (Len(Trim(Cells(i, 2).Value)) = 0)
    Next
    Application.EnableEvents = True
End Sub
Paul

Thank you for you help and sheet provided which works perfectly.

When I change my sheet, including the formulas, it hides all 3 rows and it does not unhide even when selected any field. What am I doing wrong?

the only thing I change on m vlookup formula was what you have changed, so on mine shows like these:
=IF('Case Details'!D23="","",VLOOKUP('Case Details'!D23,'Case Details'!$AA:$AI,9,FALSE))

and on your VBA code I changed it like this:

Option Explicit
Private Sub Worksheet_Calculate()
Dim i As Long
Application.EnableEvents = False
For i = 18 To 20
Rows(i).Hidden = (Len(Trim(Cells(i, 9).Value)) = 0)
Next
Application.EnableEvents = True

End Sub