PC Review


Reply
Thread Tools Rate Thread

Can I use an array formula with multiple criteria in the same row?

 
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      30th Jun 2007
I could use an "array formula" suggestion on my problem..........

I've created a database in Excel, and I am trying to use the array formula
below to count for me, but it is only working if I use a single search
criteria in Row AN (e.g. AC Initiated or Referred to Tx) but not both.

What I'd like to do (as the formula is attempting to execute) is count all
client's who were seen during the 2007 calendar year, and identify those 2007
client's who were "referred to tx" and those who began tx (e.g. AC
Initiated). I didn't know if an Array formula can search for multiple
criteria in the same row twice (once for all 2007 clients who were "Referred
to Tx" and then again for all who initiated tx (AC Initiated). I've tried
several variations of the formula below with no success. Any suggestions?
Thank you in advance, Dan

The Formula I was using that isn't working is:

=SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="AC
Initiated")*(AN4:AN3500="Referred to Tx"))
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      30th Jun 2007
Try this sumproduct alternative, normal ENTER will do:
=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(AN4:AN3500,{"AC
Initiated";"Referred to Tx"},0)))
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Dan the Man" wrote:
> I could use an "array formula" suggestion on my problem..........
>
> I've created a database in Excel, and I am trying to use the array formula
> below to count for me, but it is only working if I use a single search
> criteria in Row AN (e.g. AC Initiated or Referred to Tx) but not both.
>
> What I'd like to do (as the formula is attempting to execute) is count all
> client's who were seen during the 2007 calendar year, and identify those 2007
> client's who were "referred to tx" and those who began tx (e.g. AC
> Initiated). I didn't know if an Array formula can search for multiple
> criteria in the same row twice (once for all 2007 clients who were "Referred
> to Tx" and then again for all who initiated tx (AC Initiated). I've tried
> several variations of the formula below with no success. Any suggestions?
> Thank you in advance, Dan
>
> The Formula I was using that isn't working is:
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="AC
> Initiated")*(AN4:AN3500="Referred to Tx"))

 
Reply With Quote
 
T. Valko
Guest
Posts: n/a
 
      30th Jun 2007
Try this (normally entered):

=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*(AN4:AN3500={"Referred to Tx","AC
Initiated"}))

Biff

"Dan the Man" <Dan the (E-Mail Removed)> wrote in message
news:F5DD01D1-14B7-4531-96AC-(E-Mail Removed)...
>I could use an "array formula" suggestion on my problem..........
>
> I've created a database in Excel, and I am trying to use the array formula
> below to count for me, but it is only working if I use a single search
> criteria in Row AN (e.g. AC Initiated or Referred to Tx) but not both.
>
> What I'd like to do (as the formula is attempting to execute) is count all
> client's who were seen during the 2007 calendar year, and identify those
> 2007
> client's who were "referred to tx" and those who began tx (e.g. AC
> Initiated). I didn't know if an Array formula can search for multiple
> criteria in the same row twice (once for all 2007 clients who were
> "Referred
> to Tx" and then again for all who initiated tx (AC Initiated). I've tried
> several variations of the formula below with no success. Any suggestions?
> Thank you in advance, Dan
>
> The Formula I was using that isn't working is:
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="AC
> Initiated")*(AN4:AN3500="Referred to Tx"))



 
Reply With Quote
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      1st Jul 2007
Thank you Max. The sumproduct alternative also works with "normal entry" as
you suggested. Sorry for the multiple posts, but I'm a "newbie" to using this
wonderful discussion group.

Got another question to throw out at you or Ron (both who offered workable
suggestions with normal entry or Array's).

I attempted to modify another formula (using the "normal entry" suggestion
from Max)without success. This formula has multiple search criteria (4). Here
is that formula:

=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &
Red. Fee","MR Hearing & Red. Fee","Red Flag Hearing Client";"Medical Risk
Hearing"},0)))

Thank you in advance!

Dan

"Max" wrote:

> Try this sumproduct alternative, normal ENTER will do:
> =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(AN4:AN3500,{"AC
> Initiated";"Referred to Tx"},0)))
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
> "Dan the Man" wrote:
> > I could use an "array formula" suggestion on my problem..........
> >
> > I've created a database in Excel, and I am trying to use the array formula
> > below to count for me, but it is only working if I use a single search
> > criteria in Row AN (e.g. AC Initiated or Referred to Tx) but not both.
> >
> > What I'd like to do (as the formula is attempting to execute) is count all
> > client's who were seen during the 2007 calendar year, and identify those 2007
> > client's who were "referred to tx" and those who began tx (e.g. AC
> > Initiated). I didn't know if an Array formula can search for multiple
> > criteria in the same row twice (once for all 2007 clients who were "Referred
> > to Tx" and then again for all who initiated tx (AC Initiated). I've tried
> > several variations of the formula below with no success. Any suggestions?
> > Thank you in advance, Dan
> >
> > The Formula I was using that isn't working is:
> >
> > =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="AC
> > Initiated")*(AN4:AN3500="Referred to Tx"))

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      1st Jul 2007
On Sun, 1 Jul 2007 09:02:04 -0700, Dan the Man
<(E-Mail Removed)> wrote:

>Thank you Max. The sumproduct alternative also works with "normal entry" as
>you suggested. Sorry for the multiple posts, but I'm a "newbie" to using this
>wonderful discussion group.
>
>Got another question to throw out at you or Ron (both who offered workable
>suggestions with normal entry or Array's).
>
>I attempted to modify another formula (using the "normal entry" suggestion
>from Max)without success. This formula has multiple search criteria (4). Here
>is that formula:
>
>=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &
>Red. Fee","MR Hearing & Red. Fee","Red Flag Hearing Client";"Medical Risk
>Hearing"},0)))
>
>Thank you in advance!
>
>Dan
>



Try this **array-entered**


=SUM((YEAR(Z4:Z3500)=2007)*(S4:S3500={"RF Hearing & Red. Fee","MR Hearing &
Red. Fee","Red Flag Hearing Client","Medical Risk Hearing"}))



--ron
 
Reply With Quote
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      1st Jul 2007
And the "array" response works.............Now for the "non array" response
from Max.....(lol). Best, Dan

"Ron Rosenfeld" wrote:

> On Sun, 1 Jul 2007 09:02:04 -0700, Dan the Man
> <(E-Mail Removed)> wrote:
>
> >Thank you Max. The sumproduct alternative also works with "normal entry" as
> >you suggested. Sorry for the multiple posts, but I'm a "newbie" to using this
> >wonderful discussion group.
> >
> >Got another question to throw out at you or Ron (both who offered workable
> >suggestions with normal entry or Array's).
> >
> >I attempted to modify another formula (using the "normal entry" suggestion
> >from Max)without success. This formula has multiple search criteria (4). Here
> >is that formula:
> >
> >=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &
> >Red. Fee","MR Hearing & Red. Fee","Red Flag Hearing Client";"Medical Risk
> >Hearing"},0)))
> >
> >Thank you in advance!
> >
> >Dan
> >

>
>
> Try this **array-entered**
>
>
> =SUM((YEAR(Z4:Z3500)=2007)*(S4:S3500={"RF Hearing & Red. Fee","MR Hearing &
> Red. Fee","Red Flag Hearing Client","Medical Risk Hearing"}))
>
>
>
> --ron
>

 
Reply With Quote
 
=?Utf-8?B?TWF4?=
Guest
Posts: n/a
 
      2nd Jul 2007
The prob was you had a mixture of commas and semicolons separators in your
earlier:
> =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &

Red. Fee","MR Hearing & Red. Fee","Red Flag Hearing Client";"Medical Risk
Hearing"},0)))

Just correct all the "comma" separators between the various text phrases
within that array to semicolons (, viz this rendition should work fine:
=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &
Red. Fee";"MR Hearing & Red. Fee";"Red Flag Hearing Client";"Medical Risk
Hearing"},0)))

If you had all your text phrases listed in say, AX1 down,
you could also use either this simpler entire cols version (the "AX:AX" part)
(but it'll take a while to recalc):
=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,AX:AX,0)))

Or, this much faster, defined range version (the "AX$1:AX$10" part):
=SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,AX$1:AX$10,0)))
where the text phrases would be listed within AX1:AX10
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Dan the Man" wrote:
> .. Now for the "non array" response from Max .....

 
Reply With Quote
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      2nd Jul 2007
Max and Ron are great..............Dan

"Max" wrote:

> The prob was you had a mixture of commas and semicolons separators in your
> earlier:
> > =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &

> Red. Fee","MR Hearing & Red. Fee","Red Flag Hearing Client";"Medical Risk
> Hearing"},0)))
>
> Just correct all the "comma" separators between the various text phrases
> within that array to semicolons (, viz this rendition should work fine:
> =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,{"RF Hearing &
> Red. Fee";"MR Hearing & Red. Fee";"Red Flag Hearing Client";"Medical Risk
> Hearing"},0)))
>
> If you had all your text phrases listed in say, AX1 down,
> you could also use either this simpler entire cols version (the "AX:AX" part)
> (but it'll take a while to recalc):
> =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,AX:AX,0)))
>
> Or, this much faster, defined range version (the "AX$1:AX$10" part):
> =SUMPRODUCT((YEAR(Z4:Z3500)=2007)*ISNUMBER(MATCH(S4:S3500,AX$1:AX$10,0)))
> where the text phrases would be listed within AX1:AX10
> --
> Max
> Singapore
> http://savefile.com/projects/236895
> xdemechanik
> ---
> "Dan the Man" wrote:
> > .. Now for the "non array" response from Max .....

 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      2nd Jul 2007
welcome, Dan.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Dan the Man" <(E-Mail Removed)> wrote in message
news:B9BF7EEF-BBE7-4CF3-9180-(E-Mail Removed)...
> Max and Ron are great..............Dan



 
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
RE: Array formula - sum with multiple criteria Atreides Microsoft Excel Misc 0 1st Apr 2008 02:27 AM
Array Formula w/ Multiple SumIf Criteria =?Utf-8?B?QW5keQ==?= Microsoft Excel Worksheet Functions 3 13th Jul 2005 08:56 PM
Trouble using the { } in array formula (for multiple criteria) =?Utf-8?B?Q2Fyby1LYW5uIERlZmVuY2U=?= Microsoft Excel Programming 1 8th Apr 2005 08:46 PM
array formula w/ mutiple criteria scubagrl Microsoft Excel Worksheet Functions 1 13th Sep 2004 09:10 PM
Excel Array Formula: Multiple Criteria Sum IF Challenge SpeedThink Microsoft Excel Misc 3 28th Feb 2004 09:29 PM


Features
 

Advertising
 

Newsgroups
 


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