SUMIFS Between Date Range

betapiper

New Member
Joined
Apr 9, 2018
Messages
5
Probably a repeat question but i just cant figure this out.

Im trying to sum the number of times a persons name appears in a range on my "classes" sheet if the date in column A is between a range of dates in my "passes" sheet.

Apologies for the terrible formatting of my tables im not familiar with the sticky interface.

classes sheet

1ABCDE
2
Friday, 11 January 2019

<tbody>
</tbody>
Phillip Watson

<tbody>
</tbody>
Mary Woodson

<tbody>
</tbody>
Phillip Watson

<tbody>
</tbody>
Mary Woodson

<tbody>
</tbody>
3
Saturday, 12 January 2019

<tbody>
</tbody>
Phillip Watson

<tbody>
</tbody>
Mary Woodson

<tbody>
</tbody>
Phillip Watson

<tbody>
</tbody>
Mary Woodson

<tbody>
</tbody>
4
Sunday, 13 January 2019

<tbody>
</tbody>
Phillip WatsonMary WoodsonPhillip WatsonMary Woodson
5
Monday, 14 January 2019

<tbody>
</tbody>
Phillip WatsonPhillip WatsonMary WoodsonMary Woodson

<tbody>
</tbody>

<tbody>
</tbody>

passes sheet

1ABCDE
2Phillip WatsonFriday, 11 January 2019Friday, 12 January 2019xxxxxxxxxxxx
3
4
5

<tbody>
</tbody>









So essentially what i want to do in the "passes" D2 is sum the number of times Phillip Watson appears within "classes" B2:E5 if the date in "classes" A:A is between "passes" B2:C2

I was trying this but getting nowhere:
=SUMIFS(Classes!$C$2:$V$1000,Classes!A:A,>=Passes!C2,Classes!$A$2:$A$1000,<=Passes!D2)

Thanks
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
See if this works:

=SUMPRODUCT((classes!$B$2:$E$5=A2)*(classes!$A$2:$A$5>=B2)*(classes!$A$2:$A$5<=C2))
 
Upvote 0
Sorry for the late reply, xmas and all.

Thanks for the tip. i got it to work with the below:
=SUMPRODUCT((Classes!$B$2:$E$5=A2)*((Classes!$A$2:$A$5>=C2)+(Classes!$A$2:$A$5<=C2)))

Cheers,
 
Upvote 0
What you have there cant work for what you asked for. For your test data it gives result of 10. From what i can see it should be 4.
 
Upvote 0

Forum statistics

Threads
1,215,123
Messages
6,123,181
Members
449,090
Latest member
bes000

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