Hi,

I'm having an issue with a Macro I'm trying to run, I'm still new to this and learning but I've been pulling my hair out for a few hours now and getting nowhere so thought I'd check and see if anyone could help.

I'm running the macro below on a spreadsheet:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count > 1 Then Exit Sub

If Not Intersect(Target, Range("C4:C97")) Is Nothing Then
Select Case UCase(Target)
Case Is = "N"
Target.EntireRow.Hidden = True
Case Is = "Y"
Target.EntireRow.Hidden = False
End Select
End If

End Sub


As you can see it's fairly straightforward, if a cell value is "N" then the row is hidden, if it's Y it's not.

The problem i'm having is a can't seem to change the case to a word, i.e. "Client" as opposed to "N" without breaking the function and getting nowhere. I've tried a few different approaches but nothing seems to work. Can anyone advise?

Thanks,

Ryan