Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default combination of AutoFilter and array formula?

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default combination of AutoFilter and array formula?

you could try:
=SUMPRODUCT(--(B2:B10="x"),SUBTOTAL(3,OFFSET(B2,ROW(B2:B10)-ROW(B2),0)))

normally entered


"mark" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 989
Default combination of AutoFilter and array formula?

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

"Don Guillett" wrote:

Less cluttered than my offering.

--
Don Guillett
SalesAid Software

"JMB" wrote in message
...
you could try:
=SUMPRODUCT(--(B2:B10="x"),SUBTOTAL(3,OFFSET(B2,ROW(B2:B10)-ROW(B2),0)))

normally entered


"mark" wrote:

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





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default combination of AutoFilter and array formula?

Both should give you the same desired result

--
Don Guillett
SalesAid Software

"mark" wrote in message
...
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

"Don Guillett" wrote:

Less cluttered than my offering.

--
Don Guillett
SalesAid Software

"JMB" wrote in message
...
you could try:
=SUMPRODUCT(--(B2:B10="x"),SUBTOTAL(3,OFFSET(B2,ROW(B2:B10)-ROW(B2),0)))

normally entered


"mark" wrote:

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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
COMBINATION FORMULA Johnny Excel Discussion (Misc queries) 2 September 21st 06 07:26 PM
Manual AutoFilter - Vlookup, Index, Match, Array??? TEAM Excel Worksheet Functions 4 May 16th 06 02:49 AM
Formula Combination Randy Excel Worksheet Functions 7 April 6th 06 12:58 AM
Combination of functions for a conditional format and an array [email protected] Excel Worksheet Functions 0 March 8th 05 06:06 AM
Sum and If combination formula Kim via OfficeKB.com Excel Worksheet Functions 2 March 1st 05 09:55 PM


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"