Countif and Sumproduct on date values returns zero results

Copper Contributor

I have a column with various dates which are being populated from a database via SQL query in an excel sheet. I am trying to count the number of cells with date 15-04-2020 h.mm.ss. The minutes vary of course. I am trying to use the following formula:

 

=COUNTIF(IT!AF:AF,"15-04-2020*") but no results are returned. When I type in any exact hour minute along with it, it returns results. For example,

 

=COUNTIF(IT!AF:AF,"15-04-2020 3.36.29 AM") this works. But the time would vary and hence I am stuck. I tried using *, ?, ~ but nothing has worked so far.

 

The column AF has values which have the format shown as "custom". I can temporarily change the format and convert it all to text and check, but every time the data is refreshed from the DB, it would be back to square one. 

0 Replies