Depending on what version of XL you have and the details of how the cells get
hidden, maybe (using formula from Laurent Longre).
If the cells are hidden due to a filter, and assuming your range does not
contain cells that are empty (but a formula that returns "" should be okay)
you could try
=SUMPRODUCT(SUBTOTAL(3,OFFSET(A1,ROW(INDIRECT("1:"&ROWS(A1:A13)))-1,0)))<>ROWS(A1:A13)
should return True if cells are hidden, false if not. Assumes data is in
A1:A13.
In XL 2003, I believe subtotal function was modified to recognize cells that
were hidden by the user by using ?103? for the first argument (I don't have
XL2003 so I could be wrong - check XL help if you have XL 2003).
=SUMPRODUCT(SUBTOTAL(103,OFFSET(A1,ROW(INDIRECT("1:"&ROWS(A1:A13)))-1,0)))<>ROWS(A1:A13)
If you need to test for either situation (ie cells hidden by the user or as
a result of a filter), you may need to use both option 3 and 103 (assuming
103 only counts cells that are hidden, but not hidden by a filter).
=(SUMPRODUCT(SUBTOTAL(103,OFFSET(A1,ROW(INDIRECT("1:"&ROWS(A1:A13)))-1,0)))+SUMPRODUCT(SUBTOTAL(3,OFFSET(A1,ROW(INDIRECT("1:"&ROWS(A1:A13)))-1,0))))<>ROWS(A1:A13)
"David Godinger" wrote:
> Is there a formula that will notify me if any row in a range is hidden? (I
> don't want to do this by VBA.)
>
> I want it to notify me by formula, if that's possible, because I want to
> know immediately if something is hidden. (Once I can understand how to
> detect a hidden row, I'll probably use conditional formatting to make the
> cell turn red to warn me.)
>
> Thanks?
>
> --
> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>