Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 145
Default Array Formulas with multiple criteria in the same row?

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 we (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).

Any help would be much apreciated!

Dan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default Array Formulas with multiple criteria in the same row?

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 we (a) Referrred for Tx and/or (b) Initiated Tx (eg. AC Initiated).

Any help would be much apreciated!

Dan

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Array Formulas with multiple criteria in the same row?

On Sat, 30 Jun 2007 16:12:00 -0700, 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 we (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
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Array Formulas with multiple criteria in the same row?

Why repeat your posting? Don't you read the responses to your earlier
posting?
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 145
Default Array Formulas with multiple criteria in the same row?



"Ron Rosenfeld" wrote:

On Sat, 30 Jun 2007 16:12:00 -0700, 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 we (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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 145
Default Array Formulas with multiple criteria in the same row?

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
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 we (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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Array Formulas with multiple criteria in the same row?

On Sun, 1 Jul 2007 08:40:01 -0700, Dan the Man
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
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
Can I use an array formula with multiple criteria in the same row? Dan the Man Excel Worksheet Functions 8 July 2nd 07 04:05 AM
Understanding the logic and criteria of Array formulas Starguy Excel Worksheet Functions 2 April 29th 07 02:34 AM
SUMIF MULTIPLE ARRAY CRITERIA Santa-D Excel Worksheet Functions 1 January 16th 07 03:24 AM
Creating Array formulas with multiple criteria Space Elf Excel Worksheet Functions 2 January 15th 06 01:23 PM
Array Formula w/ Multiple SumIf Criteria Andy Excel Worksheet Functions 3 July 13th 05 08:56 PM


All times are GMT +1. The time now is 06:21 AM.

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

About Us

"It's about Microsoft Excel"