ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF use with fields of time (https://www.excelbanter.com/excel-worksheet-functions/58250-countif-use-fields-time.html)

sshakley

COUNTIF use with fields of time
 
Does anyone know how to use the countif (or a correct funtion) to count the
number of times a "time value" shows up in a series?

For example, the series J1-J100 is made of up time formated fields. The
fields have 1:03AM, 2:15AM, 4:15PM, etc in them. I want to count how many
times 1:**AM shows up in the series.

I am guessing it is something like countif(J1:J100, "1*AM"), but that
doesn't seem to work.

Any ideas?

Vito

COUNTIF use with fields of time
 

Try:

=SUMPRODUCT((J1:J100=TIMEVALUE("1:00 AM"))*(J1:J5<TIMEVALUE("2:00
AM")))


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489895


sshakley

COUNTIF use with fields of time
 
Vito:
Can you help explain the logic? It looks like you are converting 2am and
1am to decimal, but I am not following the reasoning why the mulitplication
component. (net:it didn't work). Also, why J1:J5 on the 2am side?

"Vito" wrote:


Try:

=SUMPRODUCT((J1:J100=TIMEVALUE("1:00 AM"))*(J1:J5<TIMEVALUE("2:00
AM")))


--
Vito
------------------------------------------------------------------------
Vito's Profile: http://www.excelforum.com/member.php...o&userid=29182
View this thread: http://www.excelforum.com/showthread...hreadid=489895




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

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