Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Summing days that match a criteria and date

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   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Summing days that match a criteria and date

.. 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default Summing days that match a criteria and date

"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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default Summing days that match a criteria and date

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
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
Summing the last 200 days Louja Excel Worksheet Functions 1 December 4th 09 02:43 PM
Need to pull <=14 Days, <=30 Days, 30 Days from a date column Ken Excel Discussion (Misc queries) 3 October 23rd 09 12:53 AM
Summing data between two date criteria Anna Wood Excel Worksheet Functions 5 February 27th 09 10:25 PM
Four criteria MATCH INDEX lookup of date between matching two text John_J Excel Worksheet Functions 9 September 23rd 08 01:33 PM
How to match date criteria then calculate an average of matches Buffy M. Warren Excel Worksheet Functions 5 November 21st 07 03:22 AM


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