Forum Discussion

MedhAmrita's avatar
MedhAmrita
Copper Contributor
May 09, 2020

Countif and Sumproduct on date values returns zero results

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. 

No RepliesBe the first to reply

Resources