Link to home
Start Free TrialLog in
Avatar of AFGPHXExcel
AFGPHXExcel

asked on

COUNTIFs from two columns

I am trying to count the number of dates that are greater than the corresponding date in the same row. I tried a COUNTIF but it is just looking if the date is great than any of the dates, so its not working. Here is the formula: =COUNTIFS( Date_Due_To_HQ,">"& Sent_By_Tertiary)

So if the date in Date_Due_To_HQ is greater than the corresponding date in Sent_By-Tertiary then I want it counted. Any help would be much appreciated!
Avatar of Neil Russell
Neil Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

You need something like.....

=countif(A1:A20,">"&B1)

That assumes your column A has date values in cells A1 through A20 that you want to check against and that your cell B1 has the date you want to compare with
Avatar of barry houdini
You can't do that very easily with COUNTIFS - try SUMPRODUCT, i.e.

=SUMPRODUCT((Date_Due_To_HQ>Sent_By_Tertiary)+0)

regards, barry
Avatar of AFGPHXExcel
AFGPHXExcel

ASKER

Neither gave me the solution... What I am trying to do is compare the sent date to the date due to determine if they are late, and if its late I want to count them.  The due date is variable in each row.
Then add a column? =if(Date_Due_To_HQ>Sent_By_Tertiary,1,0)
And at the bottom of it do a sum!
ASKER CERTIFIED SOLUTION
Avatar of barry houdini
barry houdini
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial