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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
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,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

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