Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a list of referrals which includes date of appointment, status (e.g.
urgent, non-urgent etc.), appointment date, waiting time (number of days from appointment received to appointment date). Thanks to help already received I can count the number of referrals received in a month/year that match a particular status. What I would like to do now is find the average waiting times for that month/year. For a start Ive been trying to sum the waiting time days using variations of the following: SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) C:C is the appointment received date, B2 is the month/year on the statistics sheet, E:E contains the status, and I:I the waiting time in days. Other versions of this formula resulted in blithering idiot messages but this one politely returns 0 which I know is wrong. Any help would be appreciated. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
.. this one politely returns 0 which I know is wrong
The sum range in your expression (ie col I in Referrals) may contain text nums. You could try an "add zero" to coerce any text nums within the sum range to real nums, viz. make it: ...,Referrals!$I$4:$I$1200+0) Any good? hit the YES below -- Max Singapore xde --- "Saylindara" wrote: I have a list of referrals which includes date of appointment, status (e.g. urgent, non-urgent etc.), appointment date, waiting time (number of days from appointment received to appointment date). Thanks to help already received I can count the number of referrals received in a month/year that match a particular status. What I would like to do now is find the average waiting times for that month/year. For a start Ive been trying to sum the waiting time days using variations of the following: SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) C:C is the appointment received date, B2 is the month/year on the statistics sheet, E:E contains the status, and I:I the waiting time in days. Other versions of this formula resulted in blithering idiot messages but this one politely returns 0 which I know is wrong. Any help would be appreciated. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
"Saylindara" wrote:
SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) If you copy-and-pasted the formula from the Formula Bar to your posting -- that is, if you have no typos in the posting -- you are missing parentheses around the first two terms. That causes the first two terms to become arrays of TRUE and FALSE, which SUMPRODUCT treats as zero. (From the Help page: "SUMPRODUCT treats array entries that are not numeric as if they were zeros".) The expression should be written as follows (copy-and-paste from here into the Formula Bar in your worksheet): SUMPRODUCT(--(MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2)), --(YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2)), --(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) ----- original message ----- "Saylindara" wrote in message ... I have a list of referrals which includes date of appointment, status (e.g. urgent, non-urgent etc.), appointment date, waiting time (number of days from appointment received to appointment date). Thanks to help already received I can count the number of referrals received in a month/year that match a particular status. What I would like to do now is find the average waiting times for that month/year. For a start Ive been trying to sum the waiting time days using variations of the following: SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) C:C is the appointment received date, B2 is the month/year on the statistics sheet, E:E contains the status, and I:I the waiting time in days. Other versions of this formula resulted in blithering idiot messages but this one politely returns 0 which I know is wrong. Any help would be appreciated. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Brilliant! Thank you.
"Joe User" wrote: "Saylindara" wrote: SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) If you copy-and-pasted the formula from the Formula Bar to your posting -- that is, if you have no typos in the posting -- you are missing parentheses around the first two terms. That causes the first two terms to become arrays of TRUE and FALSE, which SUMPRODUCT treats as zero. (From the Help page: "SUMPRODUCT treats array entries that are not numeric as if they were zeros".) The expression should be written as follows (copy-and-paste from here into the Formula Bar in your worksheet): SUMPRODUCT(--(MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2)), --(YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2)), --(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) ----- original message ----- "Saylindara" wrote in message ... I have a list of referrals which includes date of appointment, status (e.g. urgent, non-urgent etc.), appointment date, waiting time (number of days from appointment received to appointment date). Thanks to help already received I can count the number of referrals received in a month/year that match a particular status. What I would like to do now is find the average waiting times for that month/year. For a start Ive been trying to sum the waiting time days using variations of the following: SUMPRODUCT(--MONTH(Referrals!$C$4:$C$1200)=MONTH(B$2), --YEAR(Referrals!$C$4:$C$1200)=YEAR(B$2),--(Referrals!$E$4:$E$1200=€¯urgent€¯), Referrals!$I$4:$I$1200) C:C is the appointment received date, B2 is the month/year on the statistics sheet, E:E contains the status, and I:I the waiting time in days. Other versions of this formula resulted in blithering idiot messages but this one politely returns 0 which I know is wrong. Any help would be appreciated. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Summing the last 200 days | Excel Worksheet Functions | |||
Need to pull <=14 Days, <=30 Days, 30 Days from a date column | Excel Discussion (Misc queries) | |||
Summing data between two date criteria | Excel Worksheet Functions | |||
Four criteria MATCH INDEX lookup of date between matching two text | Excel Worksheet Functions | |||
How to match date criteria then calculate an average of matches | Excel Worksheet Functions |