Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Countifs with "or" embedded?

I'm trying to perfect a spreadsheet for work that will count the number of patients who have up-to-date annual paperwork of two types (call them Exam 1 and Exam 2). One of the main functions of the sheet is to alert providers of patients whose paperwork is about to expire. Therefore, the sheet uses two "date of last exam" for each of the two exams (let's say they're in columns A & B), and then has two status columns (C & D), both returning either "Absent" (if no exam has been done), "Overdue" (if the exam is out of date), "Due in 30 Days" (if the due date is within 30 days), or "Current" (if the exam is up to date) for each of the two exams.
Based on this paradigm, the data in status columns C and D can be boiled down into either "Compliant" (consisting of "Current" and "Due in 30 Days" or "Non-Compliant" (consisting of "Absent" and "Overdue".

What I'm having problems with is writing the formula that will allow me to count the number of patients that are compliant on BOTH exams without adding extra cells (that I know I can do). In other words, I'd prefer not to add a set columns that boil my data down to an intermediary level to make counting my desired result easier. Instead, I'd like to embed the necessary arguments into my formula.

Given an array of 2 columns and 11 rows that should return a value of "4", The way that seems like it SHOULD work is to say:
=COUNTIFS(C1:C11,OR(C1="Current",C1="Due in 30 Days")=true),D2:D11,OR(D1="Current",D1="Due in 30 Days")=true)

What I keep ending up with for a result is "0". I do not get an error, so if there's a syntax error, excel is reading it as something else.

Anyone have any ideas, or should I suck it up and take the easy (but less elegant) way out?

Thanks!

Reed


Submitted via EggHeadCafe - Software Developer Portal of Choice
ADO Recordset and Stored Procedures
http://www.eggheadcafe.com/tutorials...nd-stored.aspx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Countifs with "or" embedded?

There's an error in the formula.

It should've read:
=COUNTIFS(C1:C11,OR(C1="Current",C1="Due in 30 Days")=true),D1:D11,OR(D1="Current",D1="Due in 30 Days")=true)

I'd just typed it in wrong. The error isn't in my sheet, so the problem persists:(



Reed Robinson wrote:

Countifs with "or" embedded?
14-Dec-09

I'm trying to perfect a spreadsheet for work that will count the number of patients who have up-to-date annual paperwork of two types (call them Exam 1 and Exam 2). One of the main functions of the sheet is to alert providers of patients whose paperwork is about to expire. Therefore, the sheet uses two "date of last exam" for each of the two exams (let's say they're in columns A & B), and then has two status columns (C & D), both returning either "Absent" (if no exam has been done), "Overdue" (if the exam is out of date), "Due in 30 Days" (if the due date is within 30 days), or "Current" (if the exam is up to date) for each of the two exams.
Based on this paradigm, the data in status columns C and D can be boiled down into either "Compliant" (consisting of "Current" and "Due in 30 Days" or "Non-Compliant" (consisting of "Absent" and "Overdue".

What I'm having problems with is writing the formula that will allow me to count the number of patients that are compliant on BOTH exams without adding extra cells (that I know I can do). In other words, I'd prefer not to add a set columns that boil my data down to an intermediary level to make counting my desired result easier. Instead, I'd like to embed the necessary arguments into my formula.

Given an array of 2 columns and 11 rows that should return a value of "4", The way that seems like it SHOULD work is to say:
=COUNTIFS(C1:C11,OR(C1="Current",C1="Due in 30 Days")=true),D2:D11,OR(D1="Current",D1="Due in 30 Days")=true)

What I keep ending up with for a result is "0". I do not get an error, so if there's a syntax error, excel is reading it as something else.

Anyone have any ideas, or should I suck it up and take the easy (but less elegant) way out?

Thanks!

Reed

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Create the Dynamic HTML window using Java Script
http://www.eggheadcafe.com/tutorials...ic-html-w.aspx
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default Countifs with "or" embedded?

There's an error in this corrected formula because the parentheses don't
match. *Never* type in a formula. *Always* copy and paste it.

Regards,
Fred

"Reed Robinson" wrote in message
...
There's an error in the formula.

It should've read:
=COUNTIFS(C1:C11,OR(C1="Current",C1="Due in 30
Days")=true),D1:D11,OR(D1="Current",D1="Due in 30 Days")=true)

I'd just typed it in wrong. The error isn't in my sheet, so the problem
persists:(



Reed Robinson wrote:

Countifs with "or" embedded?
14-Dec-09

I'm trying to perfect a spreadsheet for work that will count the number of
patients who have up-to-date annual paperwork of two types (call them Exam
1 and Exam 2). One of the main functions of the sheet is to alert
providers of patients whose paperwork is about to expire. Therefore, the
sheet uses two "date of last exam" for each of the two exams (let's say
they're in columns A & B), and then has two status columns (C & D), both
returning either "Absent" (if no exam has been done), "Overdue" (if the
exam is out of date), "Due in 30 Days" (if the due date is within 30
days), or "Current" (if the exam is up to date) for each of the two exams.
Based on this paradigm, the data in status columns C and D can be boiled
down into either "Compliant" (consisting of "Current" and "Due in 30 Days"
or "Non-Compliant" (consisting of "Absent" and "Overdue".

What I'm having problems with is writing the formula that will allow me to
count the number of patients that are compliant on BOTH exams without
adding extra cells (that I know I can do). In other words, I'd prefer not
to add a set columns that boil my data down to an intermediary level to
make counting my desired result easier. Instead, I'd like to embed the
necessary arguments into my formula.

Given an array of 2 columns and 11 rows that should return a value of "4",
The way that seems like it SHOULD work is to say:
=COUNTIFS(C1:C11,OR(C1="Current",C1="Due in 30
Days")=true),D2:D11,OR(D1="Current",D1="Due in 30 Days")=true)

What I keep ending up with for a result is "0". I do not get an error, so
if there's a syntax error, excel is reading it as something else.

Anyone have any ideas, or should I suck it up and take the easy (but less
elegant) way out?

Thanks!

Reed

Previous Posts In This Thread:


Submitted via EggHeadCafe - Software Developer Portal of Choice
Create the Dynamic HTML window using Java Script
http://www.eggheadcafe.com/tutorials...ic-html-w.aspx


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 "countifs" be utilized to return a count of unique values? ascottbag-hcm Excel Worksheet Functions 1 October 27th 09 06:22 PM
Can "COUNTIFS" be utilized to return unique values? ascottbag-hcm Excel Worksheet Functions 0 October 27th 09 06:21 PM
Need function that will work in Excel 2003 like "Countifs" in 2007 RD[_2_] Excel Worksheet Functions 3 August 1st 08 04:35 PM
=COUNTIFS(M3:M17,"=MAN",P3:P17,"=2000")+(COUNTIFS(M3:M17,"=LHR",P Shahzad Excel Worksheet Functions 1 July 2nd 08 08:39 AM
"countifs" convert to formula in XL2002 Alan Excel Worksheet Functions 2 February 11th 08 10:01 AM


All times are GMT +1. The time now is 08:38 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"