PC Review


Reply
Thread Tools Rate Thread

Counting dates within a range

 
 
towem3
Guest
Posts: n/a
 
      27th Apr 2010
I have a large database of ~10,000 dated and timed entries. Each entry
represents the date and time of a hospital admission. I would like to know
for each entry, how many other events took place within 24 hours. I am trying
to figure out how many hospital admission happened in the 12 hours prior to
and after each admission to estimate the daily admission rate more accurately
than just by calendar day.

I have tried
=COUNTIFS(AV:AV,"<="&(AV2+0.5),AV:AV,">="&(AV2-0.5))
Where AV is the column of all dates, and AV2 is the date in question. This
formula is not accurate, and I can't figure out why

I'm looking to make a data sheet such as below (I've figured out the
calendar day column), but I can't figure out how to do the 24h count.

Id# Date Calendar day count 24h count
1 1/1/10 12:00 2 2
2 1/1/10 23:00 2 4
3 1/2/10 01:30 3 3
4 1/2/10 11:00 3 3
5 1/2/10 14:00 3 2

Thank you for your help!
 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      27th Apr 2010
Try

=SUMPRODUCT(--(AV:AV<AV2+0.5),--(AV:AV>=AV2-0.5))

--

HTH

Bob

"towem3" <(E-Mail Removed)> wrote in message
news:B44FE3D2-9488-41AB-BE36-(E-Mail Removed)...
>I have a large database of ~10,000 dated and timed entries. Each entry
> represents the date and time of a hospital admission. I would like to know
> for each entry, how many other events took place within 24 hours. I am
> trying
> to figure out how many hospital admission happened in the 12 hours prior
> to
> and after each admission to estimate the daily admission rate more
> accurately
> than just by calendar day.
>
> I have tried
> =COUNTIFS(AV:AV,"<="&(AV2+0.5),AV:AV,">="&(AV2-0.5))
> Where AV is the column of all dates, and AV2 is the date in question. This
> formula is not accurate, and I can't figure out why
>
> I'm looking to make a data sheet such as below (I've figured out the
> calendar day column), but I can't figure out how to do the 24h count.
>
> Id# Date Calendar day count 24h count
> 1 1/1/10 12:00 2 2
> 2 1/1/10 23:00 2 4
> 3 1/2/10 01:30 3 3
> 4 1/2/10 11:00 3 3
> 5 1/2/10 14:00 3 2
>
> Thank you for your help!



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Counting Soecific dates in a range T. Valko Microsoft Excel Discussion 3 11th Sep 2009 01:03 PM
Counting Empty Dates within a Range? Gina Microsoft Excel Worksheet Functions 3 24th Jul 2008 06:03 PM
Re: Counting dates within a specified range Trevor Shuttleworth Microsoft Excel Misc 0 7th Dec 2006 10:00 PM
Counting dates in a RANGE (yargh!) :) S Davis Microsoft Excel Worksheet Functions 2 27th Apr 2006 03:01 AM
Counting Dates in a Range =?Utf-8?B?TWF0dDcxMDI=?= Microsoft Excel Misc 9 13th Jan 2006 11:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:09 PM.