Forum Discussion
markyehl
Jul 16, 2020Copper Contributor
COUNTIF with dates
We have students checking in various dates. I have a column of check-in dates and would like to know how many have checked in as of today. Set a cell (D59) for today's date (=TODAY()) and used =COU...
markyehl
Jul 16, 2020Copper Contributor
Peter and Sergei - thank you so much, it worked.
Is there a way to nest the TODAY function in the COUNTIF argument and not reference cell D59? Just curious.
PeterBartholomew1
Jul 16, 2020Silver Contributor
Yes, you can nest TODAY, or other functions, to build a COUNTIF criterion
=COUNTIF(E3:E55,">="&TODAY())
It is also possible to 'hard-wire' the number as text within the criterion string
=COUNTIF(E3:E55,">=44028")
=COUNTIF(E3:E55,">=16/07/2020")
What (sadly) is not allowed is to use a function within the criterion range, e.g.
=COUNTIF(MONTH(E3:E55),">6")
because that converts a range reference into an array.