#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Hour Count

I'm trying to count the number of times a particular hour appears on my
spreadsheet. For example I have a spreadsheet listing dates and times. I
created an =MOD function to only display the time (hh:mm:ss, military time).
I would like to count the number of times a particular hour appears on the
spreadshe, ie how many times the hour "7", appears then "8" and so on and so
on until all hours are
acccounted for. I tried using =COUNTIF(B2:B520,"7*") for the the 7am hour,
but the results comes up as "0". Can anyone help with this. e

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Hour Count

Try

=SUMPRODUCT(--(HOUR(B2:B250)=7))


--


Regards,


Peo Sjoblom


"EliA" wrote in message
...
I'm trying to count the number of times a particular hour appears on my
spreadsheet. For example I have a spreadsheet listing dates and times. I
created an =MOD function to only display the time (hh:mm:ss, military
time).
I would like to count the number of times a particular hour appears on the
spreadshe, ie how many times the hour "7", appears then "8" and so on and
so
on until all hours are
acccounted for. I tried using =COUNTIF(B2:B520,"7*") for the the 7am
hour,
but the results comes up as "0". Can anyone help with this. e



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Hour Count

Hi

=COUNT(IF(HOUR(B2:B520)=7,B2:B520,FALSE))

Which is an array so commit with
Ctrl+Shift+Enter

Mike

"EliA" wrote:

I'm trying to count the number of times a particular hour appears on my
spreadsheet. For example I have a spreadsheet listing dates and times. I
created an =MOD function to only display the time (hh:mm:ss, military time).
I would like to count the number of times a particular hour appears on the
spreadshe, ie how many times the hour "7", appears then "8" and so on and so
on until all hours are
acccounted for. I tried using =COUNTIF(B2:B520,"7*") for the the 7am hour,
but the results comes up as "0". Can anyone help with this. e

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Hour Count

Thanks alot. That worked!!!

"Peo Sjoblom" wrote:

Try

=SUMPRODUCT(--(HOUR(B2:B250)=7))


--


Regards,


Peo Sjoblom


"EliA" wrote in message
...
I'm trying to count the number of times a particular hour appears on my
spreadsheet. For example I have a spreadsheet listing dates and times. I
created an =MOD function to only display the time (hh:mm:ss, military
time).
I would like to count the number of times a particular hour appears on the
spreadshe, ie how many times the hour "7", appears then "8" and so on and
so
on until all hours are
acccounted for. I tried using =COUNTIF(B2:B520,"7*") for the the 7am
hour,
but the results comes up as "0". Can anyone help with this. e




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Hour Count

=SUM(COUNTIF(A:A,{"=7:00","8:00"})*{1,-1})


"EliA" wrote:

I'm trying to count the number of times a particular hour appears on my
spreadsheet. For example I have a spreadsheet listing dates and times. I
created an =MOD function to only display the time (hh:mm:ss, military time).
I would like to count the number of times a particular hour appears on the
spreadshe, ie how many times the hour "7", appears then "8" and so on and so
on until all hours are
acccounted for. I tried using =COUNTIF(B2:B520,"7*") for the the 7am hour,
but the results comes up as "0". Can anyone help with this. e

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
Overtime for 8 hour and 40 hour Curtis Excel Discussion (Misc queries) 1 June 7th 07 07:32 PM
How to count hours- and multiply with my wage per hour... Sofus Excel Discussion (Misc queries) 4 February 4th 07 10:34 PM
Count by date and hour ChristiaanV Excel Worksheet Functions 4 August 12th 06 12:26 AM
convert decimal numbers to a fraction of an hour for payroll hour Flower Excel Worksheet Functions 4 February 10th 06 07:46 PM
How can I round an hour to the nearest 1/4 hour? Ms Chewie Excel Worksheet Functions 5 December 21st 04 05:05 AM


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