Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Countif in a time range

I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008
9:20:00 AM). I need to count how many rows have a time stamp between 08:00
and 17:00. I copied the column over one and formated it down to a 24 hour
time format. Is there a way to trim this column or write a formula that only
counts thte time?

Thanks
Scott

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Countif in a time range

Leave the date/times as they are
Use =SUMPRODUCT(--(HOUR(A1:A14000)=8),--(HOUR(A1:A14000)<=17))
Only in XL2007 can you use
=SUMPRODUCT(--(HOUR(A:A)=8),--(HOUR(A:A)<=17))
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"smcmoran" wrote in message
...
I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008
9:20:00 AM). I need to count how many rows have a time stamp between
08:00
and 17:00. I copied the column over one and formated it down to a 24 hour
time format. Is there a way to trim this column or write a formula that
only
counts thte time?

Thanks
Scott



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Countif in a time range

Scott,

To just extract the time in a separate cell you can use either:
=A2-INT(A2)
=MOD(A2,1)

Applying the second formula to your conditional count:

=SUMPRODUCT((MOD(A2:A14000,1)=TIME(8,0,0))*(MOD(A 2:A14000,1)<TIME(17,0,0)))

HTH
Kostis Vezerides

On Oct 16, 3:36*pm, smcmoran
wrote:
I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008 *
9:20:00 AM). *I need to count how many rows have a time stamp between 08:00
and 17:00. *I copied the column over one and formated it down to a 24 hour
time format. *Is there a way to trim this column or write a formula that only
counts thte time?

Thanks
Scott


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Countif in a time range

Thank you very much. Now I have to take it one step further. I need to
count up cells that are in this range AND have another cell value(TEXT).

"Bernard Liengme" wrote:

Leave the date/times as they are
Use =SUMPRODUCT(--(HOUR(A1:A14000)=8),--(HOUR(A1:A14000)<=17))
Only in XL2007 can you use
=SUMPRODUCT(--(HOUR(A:A)=8),--(HOUR(A:A)<=17))
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"smcmoran" wrote in message
...
I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008
9:20:00 AM). I need to count how many rows have a time stamp between
08:00
and 17:00. I copied the column over one and formated it down to a 24 hour
time format. Is there a way to trim this column or write a formula that
only
counts thte time?

Thanks
Scott




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Countif in a time range

Thank you very much. Now I have to take it one step further. I need to
count up cells that are in this range AND have another cell value(TEXT).

"vezerid" wrote:

Scott,

To just extract the time in a separate cell you can use either:
=A2-INT(A2)
=MOD(A2,1)

Applying the second formula to your conditional count:

=SUMPRODUCT((MOD(A2:A14000,1)=TIME(8,0,0))*(MOD(A 2:A14000,1)<TIME(17,0,0)))

HTH
Kostis Vezerides

On Oct 16, 3:36 pm, smcmoran
wrote:
I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008
9:20:00 AM). I need to count how many rows have a time stamp between 08:00
and 17:00. I copied the column over one and formated it down to a 24 hour
time format. Is there a way to trim this column or write a formula that only
counts thte time?

Thanks
Scott





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 751
Default Countif in a time range

=SUMPRODUCT((MOD(A2:A14000,1)=TIME(8,0,0))*(MOD(A 2:A14000,1)<TIME(17,0,0))*(A2:A14000="TEXT"))

HTH
Kostis

On Oct 16, 5:28*pm, smcmoran
wrote:
Thank you very much. *Now I have to take it one step further. *I need to
count up cells that are in this range AND have another cell value(TEXT).

"vezerid" wrote:
Scott,


To just extract the time in a separate cell you can use either:
=A2-INT(A2)
=MOD(A2,1)


Applying the second formula to your conditional count:


=SUMPRODUCT((MOD(A2:A14000,1)=TIME(8,0,0))*(MOD(A 2:A14000,1)<TIME(17,0,0)))


HTH
Kostis Vezerides


On Oct 16, 3:36 pm, smcmoran
wrote:
I have a list of 14,000+(DTTM) dates and times from a month, (i.e.9/1/2008 *
9:20:00 AM). *I need to count how many rows have a time stamp between 08:00
and 17:00. *I copied the column over one and formated it down to a 24 hour
time format. *Is there a way to trim this column or write a formula that only
counts thte time?


Thanks
Scott


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
COUNTIF with age range NitaMax Excel Worksheet Functions 1 October 2nd 07 08:10 PM
Using countif with a name of a range webster Excel Worksheet Functions 3 June 14th 06 02:37 PM
countif using a range gerryR Excel Worksheet Functions 7 May 23rd 06 07:16 AM
countif and sum if over a range. Michael Excel Discussion (Misc queries) 2 November 3rd 05 05:30 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM


All times are GMT +1. The time now is 04:54 PM.

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"