ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   using a time format in a count function (https://www.excelbanter.com/excel-worksheet-functions/263309-using-time-format-count-function.html)

gregv7

using a time format in a count function
 
I have a spreadsheet that has the following:
A B C
Start Time Run Day Run Time
11/14/09 12:20 AM Sat 12:20 AM
11/15/09 3:30 PM Sun 3:30PM

The cells are formatted as:
A= Date & Time
B=TEXT(A2,"ddd")
C=A2(cell reference with a time format)
My goal is to count how many times the event occurred on a particular day of
the week and count how many times it occurred during a time frame. EG Monday
between 5:00 AM & 8:00 AM
I have the count for the days of the week, I just can't get the occurrences
between the hours I need.
Thank you in advance!

T. Valko

using a time format in a count function
 
Use cells to hold the criteria...

E2 = some day of week like Mon
F2 = lower time boundary like 5:00 AM
G2 = upper time boundary like 8:00 AM

=SUMPRODUCT(--(B2:B100=E2),--(C2:C100=F2),--(C2:C100<=G2))

--
Biff
Microsoft Excel MVP


"gregv7" wrote in message
...
I have a spreadsheet that has the following:
A B C
Start Time Run Day Run Time
11/14/09 12:20 AM Sat 12:20 AM
11/15/09 3:30 PM Sun 3:30PM

The cells are formatted as:
A= Date & Time
B=TEXT(A2,"ddd")
C=A2(cell reference with a time format)
My goal is to count how many times the event occurred on a particular day
of
the week and count how many times it occurred during a time frame. EG
Monday
between 5:00 AM & 8:00 AM
I have the count for the days of the week, I just can't get the
occurrences
between the hours I need.
Thank you in advance!





All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com