PC Review


Reply
Thread Tools Rate Thread

Detect Hidden Rows by Formula

 
 
David Godinger
Guest
Posts: n/a
 
      4th Jan 2007
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
 
Reply With Quote
 
 
 
 
Mike Fogleman
Guest
Posts: n/a
 
      4th Jan 2007
Not without VBA.

Mike F
"David Godinger" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      5th Jan 2007
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
>

 
Reply With Quote
 
David Godinger
Guest
Posts: n/a
 
      5th Jan 2007
Hmmmm....thanks to JMB for leading me to a solution.

I don't understand everything he said, but I tested the following formula
in Excel 2003. It's a little crude, but it does the job for me:

=SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)

Assuming that every cell in A2 to A5 has a value in it.

If no rows are hidden, the formula gives me a 0.

Otherwise, I get a value for the number of rows that are hidden (2 if I
hid 2 rows).

The function 3 uses COUNTA to include hidden values.

The function 103 uses COUNTA to ignore hidden values.

Any improvements for this formula?

Thanks!

Dave

JMB <(E-Mail Removed)> wrote:

>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.)


--
Please delete "ANTI-SPAM" from email address (E-Mail Removed)
David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
 
Reply With Quote
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      5th Jan 2007
Sorry, I made that a lot harder than it needed to be. I'm used to seeing
that formula in a multiple condition test involving filtered data and
overlooked a simpler solution.

Subtotal(3,..) and Subtotal(103,..) should count rows that are not hidden.
To get the number of hidden rows, I think you need

=2*ROWS(A2:A5)-(SUBTOTAL(3,A2:A5)+SUBTOTAL(103,A2:A5))

I suspect your formula is working because no rows are hidden by a filter so
Subtotal(3,A2:A5) is returning the same value that Rows(A2:A5) would.

Subtotal(3, A2:A5) returns the number of rows that are visible after a
filter is applied (such as AutoFilter). Subtotal(103, A2:A5) should, as I
understand it, return the number of rows not hidden by the user
(Format/Rows/Hide).


"David Godinger" wrote:

> Hmmmm....thanks to JMB for leading me to a solution.
>
> I don't understand everything he said, but I tested the following formula
> in Excel 2003. It's a little crude, but it does the job for me:
>
> =SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)
>
> Assuming that every cell in A2 to A5 has a value in it.
>
> If no rows are hidden, the formula gives me a 0.
>
> Otherwise, I get a value for the number of rows that are hidden (2 if I
> hid 2 rows).
>
> The function 3 uses COUNTA to include hidden values.
>
> The function 103 uses COUNTA to ignore hidden values.
>
> Any improvements for this formula?
>
> Thanks!
>
> Dave
>
> JMB <(E-Mail Removed)> wrote:
>
> >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.)

>
> --
> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>

 
Reply With Quote
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      5th Jan 2007
Again, assuming there are no empty cells in your data.

"David Godinger" wrote:

> Hmmmm....thanks to JMB for leading me to a solution.
>
> I don't understand everything he said, but I tested the following formula
> in Excel 2003. It's a little crude, but it does the job for me:
>
> =SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)
>
> Assuming that every cell in A2 to A5 has a value in it.
>
> If no rows are hidden, the formula gives me a 0.
>
> Otherwise, I get a value for the number of rows that are hidden (2 if I
> hid 2 rows).
>
> The function 3 uses COUNTA to include hidden values.
>
> The function 103 uses COUNTA to ignore hidden values.
>
> Any improvements for this formula?
>
> Thanks!
>
> Dave
>
> JMB <(E-Mail Removed)> wrote:
>
> >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.)

>
> --
> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>

 
Reply With Quote
 
David Godinger
Guest
Posts: n/a
 
      5th Jan 2007
Great!

Now, how about hidden columns? The subtotal function doesn't seem to work
for that.

Thanks,

Dave

JMB <(E-Mail Removed)> wrote:

>Sorry, I made that a lot harder than it needed to be. I'm used to seeing
>that formula in a multiple condition test involving filtered data and
>overlooked a simpler solution.
>
>Subtotal(3,..) and Subtotal(103,..) should count rows that are not hidden.
>To get the number of hidden rows, I think you need
>
>=2*ROWS(A2:A5)-(SUBTOTAL(3,A2:A5)+SUBTOTAL(103,A2:A5))
>
>I suspect your formula is working because no rows are hidden by a filter so
>Subtotal(3,A2:A5) is returning the same value that Rows(A2:A5) would.
>
>Subtotal(3, A2:A5) returns the number of rows that are visible after a
>filter is applied (such as AutoFilter). Subtotal(103, A2:A5) should, as I
>understand it, return the number of rows not hidden by the user
>(Format/Rows/Hide).
>
>
>"David Godinger" wrote:
>
>> Hmmmm....thanks to JMB for leading me to a solution.
>>
>> I don't understand everything he said, but I tested the following formula
>> in Excel 2003. It's a little crude, but it does the job for me:
>>
>> =SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)
>>
>> Assuming that every cell in A2 to A5 has a value in it.
>>
>> If no rows are hidden, the formula gives me a 0.
>>
>> Otherwise, I get a value for the number of rows that are hidden (2 if I
>> hid 2 rows).
>>
>> The function 3 uses COUNTA to include hidden values.
>>
>> The function 103 uses COUNTA to ignore hidden values.
>>
>> Any improvements for this formula?
>>
>> Thanks!
>>
>> Dave
>>
>> JMB <(E-Mail Removed)> wrote:
>>
>> >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.)

>>
>> --
>> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
>> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>>


--
Please delete "ANTI-SPAM" from email address (E-Mail Removed)
David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
 
Reply With Quote
 
=?Utf-8?B?Sk1C?=
Guest
Posts: n/a
 
      6th Jan 2007
If your range was A2:F2, I expect it would be:

=2*COLUMNS(A2:F2)-(SUBTOTAL(3,A2:F2)+SUBTOTAL(103,A2:F2))


"David Godinger" wrote:

> Great!
>
> Now, how about hidden columns? The subtotal function doesn't seem to work
> for that.
>
> Thanks,
>
> Dave
>
> JMB <(E-Mail Removed)> wrote:
>
> >Sorry, I made that a lot harder than it needed to be. I'm used to seeing
> >that formula in a multiple condition test involving filtered data and
> >overlooked a simpler solution.
> >
> >Subtotal(3,..) and Subtotal(103,..) should count rows that are not hidden.
> >To get the number of hidden rows, I think you need
> >
> >=2*ROWS(A2:A5)-(SUBTOTAL(3,A2:A5)+SUBTOTAL(103,A2:A5))
> >
> >I suspect your formula is working because no rows are hidden by a filter so
> >Subtotal(3,A2:A5) is returning the same value that Rows(A2:A5) would.
> >
> >Subtotal(3, A2:A5) returns the number of rows that are visible after a
> >filter is applied (such as AutoFilter). Subtotal(103, A2:A5) should, as I
> >understand it, return the number of rows not hidden by the user
> >(Format/Rows/Hide).
> >
> >
> >"David Godinger" wrote:
> >
> >> Hmmmm....thanks to JMB for leading me to a solution.
> >>
> >> I don't understand everything he said, but I tested the following formula
> >> in Excel 2003. It's a little crude, but it does the job for me:
> >>
> >> =SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)
> >>
> >> Assuming that every cell in A2 to A5 has a value in it.
> >>
> >> If no rows are hidden, the formula gives me a 0.
> >>
> >> Otherwise, I get a value for the number of rows that are hidden (2 if I
> >> hid 2 rows).
> >>
> >> The function 3 uses COUNTA to include hidden values.
> >>
> >> The function 103 uses COUNTA to ignore hidden values.
> >>
> >> Any improvements for this formula?
> >>
> >> Thanks!
> >>
> >> Dave
> >>
> >> JMB <(E-Mail Removed)> wrote:
> >>
> >> >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.)
> >>
> >> --
> >> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
> >> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
> >>

>
> --
> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>

 
Reply With Quote
 
David Godinger
Guest
Posts: n/a
 
      6th Jan 2007
Thanks for the attempt, but I tried that already and it doesn't work. The
result of the formula is 0, whether or not any of the columns A-F are
hidden. (All the cells have values.)

Best,

Dave

JMB <(E-Mail Removed)> wrote:

>If your range was A2:F2, I expect it would be:
>
>=2*COLUMNS(A2:F2)-(SUBTOTAL(3,A2:F2)+SUBTOTAL(103,A2:F2))
>
>
>"David Godinger" wrote:
>
>> Great!
>>
>> Now, how about hidden columns? The subtotal function doesn't seem to work
>> for that.
>>
>> Thanks,
>>
>> Dave
>>
>> JMB <(E-Mail Removed)> wrote:
>>
>> >Sorry, I made that a lot harder than it needed to be. I'm used to seeing
>> >that formula in a multiple condition test involving filtered data and
>> >overlooked a simpler solution.
>> >
>> >Subtotal(3,..) and Subtotal(103,..) should count rows that are not hidden.
>> >To get the number of hidden rows, I think you need
>> >
>> >=2*ROWS(A2:A5)-(SUBTOTAL(3,A2:A5)+SUBTOTAL(103,A2:A5))
>> >
>> >I suspect your formula is working because no rows are hidden by a filter so
>> >Subtotal(3,A2:A5) is returning the same value that Rows(A2:A5) would.
>> >
>> >Subtotal(3, A2:A5) returns the number of rows that are visible after a
>> >filter is applied (such as AutoFilter). Subtotal(103, A2:A5) should, as I
>> >understand it, return the number of rows not hidden by the user
>> >(Format/Rows/Hide).
>> >
>> >
>> >"David Godinger" wrote:
>> >
>> >> Hmmmm....thanks to JMB for leading me to a solution.
>> >>
>> >> I don't understand everything he said, but I tested the following formula
>> >> in Excel 2003. It's a little crude, but it does the job for me:
>> >>
>> >> =SUBTOTAL(3,A2:A5)-SUBTOTAL(103,A2:A5)
>> >>
>> >> Assuming that every cell in A2 to A5 has a value in it.
>> >>
>> >> If no rows are hidden, the formula gives me a 0.
>> >>
>> >> Otherwise, I get a value for the number of rows that are hidden (2 if I
>> >> hid 2 rows).
>> >>
>> >> The function 3 uses COUNTA to include hidden values.
>> >>
>> >> The function 103 uses COUNTA to ignore hidden values.
>> >>
>> >> Any improvements for this formula?
>> >>
>> >> Thanks!
>> >>
>> >> Dave
>> >>
>> >> JMB <(E-Mail Removed)> wrote:
>> >>
>> >> >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.)
>> >>
>> >> --
>> >> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
>> >> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>> >>

>>
>> --
>> Please delete "ANTI-SPAM" from email address (E-Mail Removed)
>> David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
>>


--
Please delete "ANTI-SPAM" from email address (E-Mail Removed)
David Godinger: Go player, student of Mahatma Gandhi, the Buddha, and Dr. Martin King
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula or Code to keep Hidden Rows Hidden =?Utf-8?B?Q2Fyb2w=?= Microsoft Excel Worksheet Functions 6 1st May 2007 11:45 PM
Detect Hidden Columns by Formula David Godinger Microsoft Excel Programming 5 9th Jan 2007 03:09 AM
How do I detect hidden worksheets or hidden data on a worksheet? =?Utf-8?B?QWxpY2U=?= Microsoft Excel Misc 4 24th Aug 2006 03:38 AM
How to detect hidden rows? Benton Microsoft ADO .NET 2 17th Jan 2006 04:56 PM
Hidden rows not included in formula =?Utf-8?B?TWFydGE=?= Microsoft Excel Worksheet Functions 5 6th Jul 2004 06:41 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:42 AM.