Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Countif Date in column A is greater than column B [closed]

Columns A and B both have dates. If the date in column A is greater than the date in the same row of column B, the row should be counted. To add context, I am trying to count the number of rows where the completion date is past the due date. How can this be accomplished?

Thanks.

like image 747
spassen Avatar asked Dec 26 '12 19:12

spassen


2 Answers

You can try this:

=SUMPRODUCT(--(A:A>B:B))

It will sum all instances in the range where the date in column A is greater than that in column B.

You can also do this, however it needs to be entered as an array formula (Ctrl+Shift+Enter):

=SUM(IF(A:A>B:B,1,0))
like image 77
RocketDonkey Avatar answered Nov 20 '22 23:11

RocketDonkey


Create a column that has a function to perform the comparison, e.g. =A1 > B1. This will give you a column that contains TRUE or FALSE for your comparison. Then you can use the COUNTIF function to count the results of this function, e.g. =COUNTIF(C:C, "=TRUE").

like image 1
Fls'Zen Avatar answered Nov 20 '22 23:11

Fls'Zen