Is a cell visible

J

John

I tried this and it does not work how come

If Range("N9").SpecialCells(xlCellTypeVisible) = True Then
MsgBox "True"
Else
MsgBox "False"
End If
 
A

Andy Pope

Hi,

Here are a couple of ways.

If Intersect(Range("N9"), Range("N9").SpecialCells(xlCellTypeVisible)) Is
Nothing Then
MsgBox "Invisible"
Else
MsgBox "Visible"
End If

Or

With Range("N9")
If .EntireRow.Hidden Or .EntireColumn.Hidden Then
MsgBox "Invisible"
Else
MsgBox "Visible"
End If
End With

Cheers
Andy
 
J

John

THANKS

One more question. Is there a way to show progamatically to toggle
between the filtered and unfiltered view?
 
Top