PDA

View Full Version : Unhide specifc row based on cell



jvong2
09-29-2011, 02:30 PM
Hi, new to the forums. Great place for information. I've tried searching but have been unsucessful. I am trying to find a code that will unhide row 50 if cell B26 has the word "Yes". Can someone help with with this? I'd appreciate it.

Bob Phillips
09-29-2011, 03:04 PM
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit

Application.EnableEvents = False

If Not Intersect(Target, Me.Range("B26")) Is Nothing Then

Me.Rows(50).Hidden = Target <> "Yes"
End If

ws_exit:
Application.EnableEvents = True
End Sub