Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Count if between date parameters

I need create a formula that show how many patients were available to be seen
on each day of the month. I would like to make the cut-off for changes of
dates as 3pm, meaning that one day is from 3pm - 3pm the next day.

e.g. - 12/30/09 available patients would be all those there from 3:01pm on
12/29/09 to 3:00pm on 12/30/09.

If they're available for the full day count them only. Using this logic with
the data below on 12/30/09 only 2 patients were available to be seen.

Name Request DT Res DT
P1 12/27/2009 1:26 12/31/2009 16:28
P2 12/27/2009 12:00 12/30/2009 7:20
P3 12/23/2009 9:09 12/23/2009 9:12
P4 12/18/2009 10:25 12/18/2009 12:44
P5 12/29/2009 6:04 12/31/2009 9:20
P6 12/13/2009 15:37 12/13/2009 15:39



--
Miroshak
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Count if between date parameters

Your question is not clear enough for an outsider, because you don't specify
clearly the criterium of being available, what do "Request DT" and "Res DT"
mean, but maybe this formula gives you a guide: if days are in column D then
enter formula in E2 and fill it down as required; it counts values in C2:C7
between 3pm - 3pm the next day.

Clarify yor request for more help!


--
Regards!
Stefi



€˛miroshak€¯ ezt Ć*rta:

I need create a formula that show how many patients were available to be seen
on each day of the month. I would like to make the cut-off for changes of
dates as 3pm, meaning that one day is from 3pm - 3pm the next day.

e.g. - 12/30/09 available patients would be all those there from 3:01pm on
12/29/09 to 3:00pm on 12/30/09.

If they're available for the full day count them only. Using this logic with
the data below on 12/30/09 only 2 patients were available to be seen.

Name Request DT Res DT
P1 12/27/2009 1:26 12/31/2009 16:28
P2 12/27/2009 12:00 12/30/2009 7:20
P3 12/23/2009 9:09 12/23/2009 9:12
P4 12/18/2009 10:25 12/18/2009 12:44
P5 12/29/2009 6:04 12/31/2009 9:20
P6 12/13/2009 15:37 12/13/2009 15:39



--
Miroshak

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Count if between date parameters

With the query date 12/30/09 in cell D1 try the below formula...

=SUMPRODUCT((B1:B10<D1-1+TIME(15,0,0))*(C1:C10=D1+TIME(15,0,0)))

--
Jacob


"miroshak" wrote:

I need create a formula that show how many patients were available to be seen
on each day of the month. I would like to make the cut-off for changes of
dates as 3pm, meaning that one day is from 3pm - 3pm the next day.

e.g. - 12/30/09 available patients would be all those there from 3:01pm on
12/29/09 to 3:00pm on 12/30/09.

If they're available for the full day count them only. Using this logic with
the data below on 12/30/09 only 2 patients were available to be seen.

Name Request DT Res DT
P1 12/27/2009 1:26 12/31/2009 16:28
P2 12/27/2009 12:00 12/30/2009 7:20
P3 12/23/2009 9:09 12/23/2009 9:12
P4 12/18/2009 10:25 12/18/2009 12:44
P5 12/29/2009 6:04 12/31/2009 9:20
P6 12/13/2009 15:37 12/13/2009 15:39



--
Miroshak

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 834
Default Count if between date parameters

Assuming the date to check is in cell E1, try

=SUMPRODUCT(--(B2:B7<=$E$1-1+"15:00:00"),--(C2:C7=$E$1+"15:00:00"))

HTH

Bob

"miroshak" wrote in message
...
I need create a formula that show how many patients were available to be
seen
on each day of the month. I would like to make the cut-off for changes of
dates as 3pm, meaning that one day is from 3pm - 3pm the next day.

e.g. - 12/30/09 available patients would be all those there from 3:01pm
on
12/29/09 to 3:00pm on 12/30/09.

If they're available for the full day count them only. Using this logic
with
the data below on 12/30/09 only 2 patients were available to be seen.

Name Request DT Res DT
P1 12/27/2009 1:26 12/31/2009 16:28
P2 12/27/2009 12:00 12/30/2009 7:20
P3 12/23/2009 9:09 12/23/2009 9:12
P4 12/18/2009 10:25 12/18/2009 12:44
P5 12/29/2009 6:04 12/31/2009 9:20
P6 12/13/2009 15:37 12/13/2009 15:39



--
Miroshak



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Count if between date parameters

Sorry, forgot to paste the formula:

=SUMPRODUCT(--($C$2:$C$7=D2-1+TIME(15,0,0)),--($C$2:$C$7<=D2+TIME(15,0,0)))


--
Regards!
Stefi



€˛Stefi€¯ ezt Ć*rta:

Your question is not clear enough for an outsider, because you don't specify
clearly the criterium of being available, what do "Request DT" and "Res DT"
mean, but maybe this formula gives you a guide: if days are in column D then
enter formula in E2 and fill it down as required; it counts values in C2:C7
between 3pm - 3pm the next day.

Clarify yor request for more help!


--
Regards!
Stefi



€˛miroshak€¯ ezt Ć*rta:

I need create a formula that show how many patients were available to be seen
on each day of the month. I would like to make the cut-off for changes of
dates as 3pm, meaning that one day is from 3pm - 3pm the next day.

e.g. - 12/30/09 available patients would be all those there from 3:01pm on
12/29/09 to 3:00pm on 12/30/09.

If they're available for the full day count them only. Using this logic with
the data below on 12/30/09 only 2 patients were available to be seen.

Name Request DT Res DT
P1 12/27/2009 1:26 12/31/2009 16:28
P2 12/27/2009 12:00 12/30/2009 7:20
P3 12/23/2009 9:09 12/23/2009 9:12
P4 12/18/2009 10:25 12/18/2009 12:44
P5 12/29/2009 6:04 12/31/2009 9:20
P6 12/13/2009 15:37 12/13/2009 15:39



--
Miroshak

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
How can I sum a range using two parameters (eg location & date) Gory Excel Discussion (Misc queries) 2 July 1st 08 02:11 AM
Excel 2002: How to sum up base on date parameters ? Mr. Low Excel Discussion (Misc queries) 4 March 27th 08 03:55 PM
Count on multiple parameters TJ[_2_] Excel Worksheet Functions 3 February 27th 07 08:23 PM
Using parameters to use different source files dependant on the date. stuckupnorth Excel Discussion (Misc queries) 1 February 8th 06 07:20 PM
Help : Using Parameters with External Date Query Bdavis Excel Discussion (Misc queries) 0 March 31st 05 05:03 PM


All times are GMT +1. The time now is 12:39 AM.

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"