SUMPRODUCT - Count where date difference

djmixer135

New Member
Joined
Nov 19, 2018
Messages
13
Hi there,

[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Submitted[/TD]
[TD]Assessed[/TD]
[/TR]
[TR]
[TD]Bob[/TD]
[TD]01/01/2019[/TD]
[TD]05/01/2019[/TD]
[/TR]
[TR]
[TD]John[/TD]
[TD]01/01/2019[/TD]
[TD]31/01/2019[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]01/01/2019[/TD]
[TD]20/02/2019[/TD]
[/TR]
</tbody>[/TABLE]

I'm looking to use SUMPRODUCT function to count the number of records in the table above where the date difference between column B and C is less than 10 days. In the example above, the SUMPRODUCT formula should return a value of 1.

Please advise as to what the formula would look like for this.

Many thanks!
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Thanks! That's really helpful. As an extension to this question, please can you explain why this won't work?

Code:
SUMPRODUCT(--('Assessments'!$C$2:$C$10000<('Assessments'!$B$2:$B$10000+10), --('Assessments'!$A$2:$A$10000="Bob"))

This should only count records where name = Bob
 
Upvote 0
Missing a )

=SUMPRODUCT(--('Assessments'!$C$2:$C$10000<('Assessments'!$B$2:$B$10000+10)), --('Assessments'!$A$2:$A$10000="Bob"))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
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