PC Review


Reply
Thread Tools Rate Thread

Array Formulas with multiple criteria in the same row?

 
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      1st Jul 2007
FORMULA I NEED HELP WITH:

=SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="Referred to Tx))*(AN4:AN3500="AC
Initiated"))

MY PROBLEM

In Row Z I am listing dates, and in Row AN I am listing whether or not
clients were Referred to Treatment (Tx), and whether or not they began
treatment (e.g. AC Initiated). I can get the above formula to work with only
one search criteria in Row AN and the appliable date range in Row Z (e.g. the
year 2007), however I cannot get the formula to work, when I enter 2 search
criteria in Row AN (Referred to Tx and AC Initiated). Can an array formula
search the same row twice (AN), and count all clients who were seen in 2007
who were: (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).

Any help would be much apreciated!

Dan
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Ymo=?=
Guest
Posts: n/a
 
      1st Jul 2007
try sumproduct() with the same criteria
or try enetering your formula as an array formula control-shift-enter

"Dan the Man" wrote:

> FORMULA I NEED HELP WITH:
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="Referred to Tx))*(AN4:AN3500="AC
> Initiated"))
>
> MY PROBLEM
>
> In Row Z I am listing dates, and in Row AN I am listing whether or not
> clients were Referred to Treatment (Tx), and whether or not they began
> treatment (e.g. AC Initiated). I can get the above formula to work with only
> one search criteria in Row AN and the appliable date range in Row Z (e.g. the
> year 2007), however I cannot get the formula to work, when I enter 2 search
> criteria in Row AN (Referred to Tx and AC Initiated). Can an array formula
> search the same row twice (AN), and count all clients who were seen in 2007
> who were: (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).
>
> Any help would be much apreciated!
>
> Dan

 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      1st Jul 2007
On Sat, 30 Jun 2007 16:12:00 -0700, Dan the Man
<(E-Mail Removed)> wrote:

>FORMULA I NEED HELP WITH:
>
>=SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="Referred to Tx))*(AN4:AN3500="AC
>Initiated"))
>
>MY PROBLEM
>
>In Row Z I am listing dates, and in Row AN I am listing whether or not
>clients were Referred to Treatment (Tx), and whether or not they began
>treatment (e.g. AC Initiated). I can get the above formula to work with only
>one search criteria in Row AN and the appliable date range in Row Z (e.g. the
>year 2007), however I cannot get the formula to work, when I enter 2 search
>criteria in Row AN (Referred to Tx and AC Initiated). Can an array formula
>search the same row twice (AN), and count all clients who were seen in 2007
>who were: (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).
>
>Any help would be much apreciated!
>
>Dan


The multiplication operator mimics AND.

To mimic OR you need the addition operator.

=SUM((--(YEAR(Z4:Z3500)=2007))*((AN4:AN3500="Referred to Tx"))+(AN4:AN3500="AC
Initiated"))))

or, perhaps using an array constant:

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

or, since I think the double unary is unneccessary:

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


--ron
 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      1st Jul 2007
Why repeat your posting? Don't you read the responses to your earlier
posting?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


 
Reply With Quote
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      1st Jul 2007


"Ron Rosenfeld" wrote:

> On Sat, 30 Jun 2007 16:12:00 -0700, Dan the Man
> <(E-Mail Removed)> wrote:
>
> >FORMULA I NEED HELP WITH:
> >
> >=SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="Referred to Tx))*(AN4:AN3500="AC
> >Initiated"))
> >
> >MY PROBLEM
> >
> >In Row Z I am listing dates, and in Row AN I am listing whether or not
> >clients were Referred to Treatment (Tx), and whether or not they began
> >treatment (e.g. AC Initiated). I can get the above formula to work with only
> >one search criteria in Row AN and the appliable date range in Row Z (e.g. the
> >year 2007), however I cannot get the formula to work, when I enter 2 search
> >criteria in Row AN (Referred to Tx and AC Initiated). Can an array formula
> >search the same row twice (AN), and count all clients who were seen in 2007
> >who were: (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).
> >
> >Any help would be much apreciated!
> >
> >Dan

>
> The multiplication operator mimics AND.
>
> To mimic OR you need the addition operator.
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*((AN4:AN3500="Referred to Tx"))+(AN4:AN3500="AC
> Initiated"))))
>
> or, perhaps using an array constant:
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500={"Referred to Tx","AC Initiated"}))
>
> or, since I think the double unary is unneccessary:
>
> =SUM((YEAR(Z4:Z3500)=2007)*(AN4:AN3500={"Referred to Tx","AC Initiated"}))
>
>
> --ron
>

 
Reply With Quote
 
=?Utf-8?B?RGFuIHRoZSBNYW4=?=
Guest
Posts: n/a
 
      1st Jul 2007
Thank you very much Ron! You soloved my problem, and you were correct, the
double unary is indeed unneccessary!

Happy 4th of July!

Dan

"Ron Rosenfeld" wrote:

> On Sat, 30 Jun 2007 16:12:00 -0700, Dan the Man
> <(E-Mail Removed)> wrote:
>
> >FORMULA I NEED HELP WITH:
> >
> >=SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500="Referred to Tx))*(AN4:AN3500="AC
> >Initiated"))
> >
> >MY PROBLEM
> >
> >In Row Z I am listing dates, and in Row AN I am listing whether or not
> >clients were Referred to Treatment (Tx), and whether or not they began
> >treatment (e.g. AC Initiated). I can get the above formula to work with only
> >one search criteria in Row AN and the appliable date range in Row Z (e.g. the
> >year 2007), however I cannot get the formula to work, when I enter 2 search
> >criteria in Row AN (Referred to Tx and AC Initiated). Can an array formula
> >search the same row twice (AN), and count all clients who were seen in 2007
> >who were: (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).
> >
> >Any help would be much apreciated!
> >
> >Dan

>
> The multiplication operator mimics AND.
>
> To mimic OR you need the addition operator.
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*((AN4:AN3500="Referred to Tx"))+(AN4:AN3500="AC
> Initiated"))))
>
> or, perhaps using an array constant:
>
> =SUM((--(YEAR(Z4:Z3500)=2007))*(AN4:AN3500={"Referred to Tx","AC Initiated"}))
>
> or, since I think the double unary is unneccessary:
>
> =SUM((YEAR(Z4:Z3500)=2007)*(AN4:AN3500={"Referred to Tx","AC Initiated"}))
>
>
> --ron
>

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

>Thank you very much Ron! You soloved my problem, and you were correct, the
>double unary is indeed unneccessary!
>
>Happy 4th of July!
>
>Dan


You're welcome. Glad to help. Thanks for the feedback.
--ron
 
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
Need Help w/ formulas for multiple criteria Jack.Matos Microsoft Excel Worksheet Functions 4 22nd Dec 2008 07:12 PM
Understanding the logic and criteria of Array formulas =?Utf-8?B?U3Rhcmd1eQ==?= Microsoft Excel Worksheet Functions 2 29th Apr 2007 02:34 AM
Using SUMPRODUCT or an Array to calculate formulas with multiple criteria? jim_0068 Microsoft Excel Discussion 5 14th Jun 2006 12:04 PM
multiple criteria for formulas =?Utf-8?B?Sm9kaQ==?= Microsoft Excel Misc 4 11th May 2006 10:43 PM
Creating Array formulas with multiple criteria =?Utf-8?B?U3BhY2UgRWxm?= Microsoft Excel Worksheet Functions 2 15th Jan 2006 01:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:35 PM.