Comparing due dates with completion dates

CodePest

New Member
Joined
Jan 16, 2018
Messages
13
Hi there, first time poster here.

I'm sure there is a simple solution here but I hope someone in the group can help me.

I built an application that tracks requests made by clients. When we receive a request, a due date is generated. When our agents submit their work, the date of completion is pasted in an adjacent column next to the due date corresponding with the client request.

I need to count how many times the work is submitted late.

I'm sure I can do it in VBA, but I'd rather it was a native excel equation that refreshed each time the data updates.

How would you create an equation that counts how many times work was completed on time and how many times it was late? Using the following sample should return 3 on time and 3 late:

AB
Due DatesWork Complete
1/10/20181/9/2018
1/10/20181/9/2018
1/13/20181/9/2018
1/13/20181/16/2018
1/14/20181/16/2018
1/14/20181/16/2018

<tbody>
</tbody>
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Welcome to the Board!

Enter this formula with CTRL-SHIFT-ENTER (instead of just enter):
Code:
{=SUM(IF(A3:A8>B3:B8,1,0))}
Note: Don't really type the squiggly brackets, those just indicate that it is an array formula entered with CTRL-SHIFT-ENTER (you will see them if you enter it correctly).
 
Upvote 0
Thank you for the reply!

Do you know how to modify this equation to ignore empty cells in B. I have equations in each cell but a date only generates if one is available.
 
Upvote 0
Hi,

Try these for ON TIME and LATE:


Book1
ABCDE
1Due DatesWork CompleteOn TimeLate
21/10/20181/9/201844
31/10/20181/9/2018
41/13/20181/9/2018
51/13/20181/16/2018
61/14/20181/16/2018
71/14/20181/16/2018
81/14/2018
91/16/2018
101/16/20181/16/2018
Sheet2
Cell Formulas
RangeFormula
D2=SUMPRODUCT(--(A2:A10>=B2:B10)*(B2:B10<>""))
E2=SUMPRODUCT(--(A2:A10))+COUNTIFS(B2:B10,"",A2:A10,"<"&TODAY())
 
Upvote 0
Try this:
Code:
=SUMPRODUCT(--(A3:A8>B3:B8),--(B3:B8<>""))


EDIT: Look like jtakw already posted the SUMPRODUCT solution while I was testing!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,877
Messages
6,122,051
Members
449,064
Latest member
scottdog129

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top