-1

=COUNT(Due_Date<IF(ISBLANK(Final_Report_Date),Due_Date-1,Final_Report_Date)) gave me the result 1 which is correct.

But when i use =COUNTIF(Due_Date,"<"&IF(ISBLANK(Final_Report_Date),Due_Date-1,Final_Report_Date)) it gave me 131. Why those two does not return the same result?

Both Due_Date, and Final_Report_Date are named range.

kevin
  • 13,559
  • 30
  • 79
  • 104

1 Answers1

1

Such comparisons are best handled by SUMPRODUCT:

=SUMPRODUCT(0+(Due_Date<N(+Final_Report_Date)))

Regards

XOR LX
  • 7,632
  • 1
  • 16
  • 15
  • It works perfectly. But don't understand how it works. Sorry, i just learn excel like 4 months ago. Sumproduct is to multiple one array with another array to my understand. Could you explain me how your formula works? – kevin May 16 '18 at 11:22