Search code examples
excelexcel-formulaworksheet-functioncountif

COUNTIF formula based on today's date


Suppose in A1:A10 some dates are there and in B1:B10 I am having some receipt number. I want to count all the receipt numbers for today's date in A1:A10.

Can anybody help me?


Solution

  • try this:

    =SUMPRODUCT((A1:A10=TODAY())*(B1:B10<>""))
    

    or, if your receipts column can't contain empty cells, just

    =SUMPRODUCT((A1:A10=TODAY())*1)
    

    UPD:

    how should i use a start date and a end date in the same formula

    =SUMPRODUCT((A1:A10>= DATE(2014,2,1))*(A1:A10<= DATE(2014,2,28))*(B1:B10<>""))