Sumproduct to match dates with different formats

jwbrouse01

New Member
Joined
Jun 2, 2022
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Greetings.

I am struggling to modify my sumproduct formula that will count for items that were completed on time. Column L has my completion date with date and time (01/30/2024 09:18), but Column H is always set to 01/30/2024 00:00.

If I do a direct comparison - --(Sheet1!$L:$L<=Sheet1!$H:$H) - it only gives a count of the tasks that were completed earlier than the due date. How do I alter my sumproduct to include the due date?

Any help is appreciated!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Can you post a sample of your data so we can see what you are working with?

One option would be to convert the dates in Columns L and H using the text formula such as
VBA Code:
TEXT(H1,"mm/dd/yyyy")
This should allow you to do a direct comparison. It is hard for us to come up with a robust formula without some sample data.
 
Upvote 0
Is this what you are after?
I assumed that if completed at any time on the target date that counted as on time (eg row 3)
My dates are d/m/y format
(I manually coloured the ones I think you are trying to count)

24 02 01.xlsm
FGHL
1Count on timeTarget CompletionCompletion
2826/01/2024 00:0012/01/2024 17:34
305/01/2024 00:0005/01/2024 10:52
405/01/2024 00:0030/01/2024 07:40
508/01/2024 00:0015/01/2024 09:21
603/01/2024 00:0013/01/2024 20:47
701/01/2024 00:0030/01/2024 03:32
801/02/2024 00:0027/01/2024 09:03
904/01/2024 00:0020/01/2024 01:37
1016/01/2024 00:0030/01/2024 10:01
1115/01/2024 00:0004/01/2024 02:20
1204/01/2024 00:0027/01/2024 20:36
1304/01/2024 00:0002/01/2024 21:33
1429/01/2024 00:0011/01/2024 12:11
1506/01/2024 00:0002/01/2024 05:41
1619/01/2024 00:0012/01/2024 18:49
On time
Cell Formulas
RangeFormula
F2F2=SUMPRODUCT(--(INT(L2:L16)<=H2:H16))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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