Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / June 2007

Tip: Looking for answers? Try searching our database.

combination of AutoFilter and array formula?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 29 Jun 2007 19:32 GMT
Hi.  Someone just called me about a formula that one of the managers thinks
he needs.  I can do what they want in three rows, but am not seeing how to do
it in one row, and have it change with the AutoFilter.

They have something like the following, across rows and columns:
         Schedule     Value
Row1     1               X
Row2     2               C
Row3     3           NULL
Row4     1           NULL
Row5     2                X
Row6     3           NULL

They want to count the instances of X for each schedule, where AutoFilter is
turned on, and they pick schedule 1, 2 , or 3, from the drop down.

I can give them an array formula based upon another cell, say A12, that will
do it:

=SUM(--(B2:B9="X")*--(A2:A9=A12))

But in that example, you have to type the 1, 2, or 3 in cell A12... that is
not automatically picked up from the filtered selection.

I tried combining the array formula above with a subtotal(9,), but I didn't
get that to enter with the array.  Perhaps I just had a syntax problem.

Suggestions?

Thanks.
Mark
Don Guillett - 29 Jun 2007 22:59 GMT
try this array entered formula to find and use the value in the first
visible cell
=SUM(--(B2:B100="x")*--(A2:A100=INDEX(A2:A100,MATCH(1,SUBTOTAL(3,OFFSET(A2:A100,ROW(A2:A100)-ROW(A2),0,1)),0))))

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Hi.  Someone just called me about a formula that one of the managers
> thinks
[quoted text clipped - 33 lines]
> Thanks.
> Mark
JMB - 30 Jun 2007 00:12 GMT
you could try:
=SUMPRODUCT(--(B2:B10="x"),SUBTOTAL(3,OFFSET(B2,ROW(B2:B10)-ROW(B2),0)))

normally entered

> Hi.  Someone just called me about a formula that one of the managers thinks
> he needs.  I can do what they want in three rows, but am not seeing how to do
[quoted text clipped - 27 lines]
> Thanks.
> Mark
Don Guillett - 30 Jun 2007 01:11 GMT
Less cluttered than my offering.

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> you could try:
> =SUMPRODUCT(--(B2:B10="x"),SUBTOTAL(3,OFFSET(B2,ROW(B2:B10)-ROW(B2),0)))
[quoted text clipped - 38 lines]
>> Thanks.
>> Mark
mark - 30 Jun 2007 19:12 GMT
Thank you both.  I will try your suggestion on Monday when I get back to it,
if not later today.

I recognize your names, and am sure from that that your advice is good.

Thank you.
Mark

> Less cluttered than my offering.
>
[quoted text clipped - 40 lines]
> >> Thanks.
> >> Mark
Don Guillett - 30 Jun 2007 21:44 GMT
Both should give you the same desired result

Signature

Don Guillett
SalesAid Software
dguillett1@austin.rr.com

> Thank you both.  I will try your suggestion on Monday when I get back to
> it,
[quoted text clipped - 54 lines]
>> >> Thanks.
>> >> Mark
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.