1

enter image description here

I have two columns. The first one records when a signup happens (with the time), and the second one is a simple date increment that should count how many signups happened within that day.

For example, for 2022-07-13, the answer should be 2 (2022-07-13 2:32:12 and 2022-07-13 12:30:59)

My formula was: =COUNTIF(A:A,TO_TEXT(B2&"*"))

  • Turn 2022-07-13 date into a text, and look for 2022-07-13* matches in A:A, so I was expecting that 2022-07-13 2:32:12 and 2022-07-13 12:30:59 show up, however it is still showing 0
2

2 Answers 2

1

You need COUNTIFS() instead COUNTIF()

=COUNTIFS(A2:A,">="&B2,A2:A,"<"&(B2+1))
1

You could rearrange your sheet to something more "readable" and use the following single formula:

=INDEX(IF(LEN(B2:B22), 
    COUNTIF(INDEX(IFERROR(SPLIT(A2:A22," ")),,1),B2:B22),))

enter image description here

(Please adjust ranges according to your needs)

Functions used:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.