0

I'm trying to calculate this for a column.

=countifs(another_sheet!E:E, A2,
   datevalue(another_sheet!A:A),datevalue(B2))

another_sheet!A:A has timestamps that look like 4/23/2023 14:13:43 Whereas column B has values that look like 4/23/2023.

How would you suggest managing this so that I can compare properly? I'm looking for the date matches (don't care about the timestamp itself).

1
  • Please edit your question to make it more clear. You wrote "I'm trying to calculate this for a column" but your example formula includes two columns, not one.
    – Blindspots
    Jul 1, 2023 at 20:52

1 Answer 1

2

I'm looking for the date matches (don't care about the timestamp itself).

If you want to use COUNTIFS to count all the rows where both conditions are matched and you want to ignore times, then DATEVALUE should be applied to all the values, and the formula should also be wrapped in ARRAYFORMULA:

=ARRAYFORMULA(
   COUNTIFS(DATEVALUE(another_sheet!E:E), DATEVALUE(A2), 
            DATEVALUE(another_sheet!A:A), DATEVALUE(B2)))

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.