SumIF question, multiple criteria

Rav_Singh

New Member
Joined
Jun 29, 2019
Messages
28
I am attempting to summarise a large data-set and am having trouble trying to collate the sum total.

Hopefully the below example displays correctly on this page.

Sample of data-set is below;

[TABLE="width: 323"]
<colgroup><col><col><col span="2"></colgroup><tbody>[TR]
[TD]Qtrly[/TD]
[TD]Modified Date[/TD]
[TD]Docs[/TD]
[TD]Emails[/TD]
[/TR]
[TR]
[TD]Q1-2018[/TD]
[TD]15/01/2018[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Q1-2018[/TD]
[TD]16/01/2018[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Q2-2018[/TD]
[TD]17/04/2018[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Q2-2018[/TD]
[TD]18/05/2018[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Q3-2018[/TD]
[TD]19/07/2018[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Q3-2018[/TD]
[TD]22/08/2018[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Q4-2018[/TD]
[TD]23/10/2018[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Q4-2018[/TD]
[TD]25/12/2018[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]

I would like to calculate the sum totals of 'Docs' and 'Emails' based upon the Qtrly dates.

i.e. so for the answers it should hopefully reflect the table below.

[TABLE="width: 262"]
<colgroup><col><col span="2"></colgroup><tbody>[TR]
[TD]Qtrly[/TD]
[TD]Docs[/TD]
[TD]Emails[/TD]
[/TR]
[TR]
[TD]Q1-2018[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Q2-2018[/TD]
[TD]0[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Q3-2018[/TD]
[TD]1[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Q4-2018[/TD]
[TD]0[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]

This seems a common formula however the different CountIF/SumIF formulas have not returned the values I was hoping for. Any help would be gratefully received.

Rav
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about

Book1
ABCDEFGHI
1QtrlyModified DateDocsEmailsQtrlyDocsEmails
2Q1-201815/01/201810Q1-201820
3Q1-201816/01/201810Q2-201803
4Q2-201817/04/201803Q3-201811
5Q2-201818/05/201800Q4-201805
6Q3-201819/07/201810
7Q3-201822/08/201801
8Q4-201823/10/201802
9Q4-201825/12/201803
Summary
Cell Formulas
RangeFormula
H2=SUMIF($A:$A,$G2,C:C)
I2=SUMIF($A:$A,$G2,D:D)
 
Upvote 0
This is exactly what I needed! Thanks for making me feel silly! :)

Much appreciated as always.

How about
ABCDEFGHI
QtrlyModified DateDocsEmailsQtrlyDocsEmails
Q1-2018Q1-2018
Q1-2018Q2-2018
Q2-2018Q3-2018
Q2-2018Q4-2018
Q3-2018
Q3-2018
Q4-2018
Q4-2018

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]2[/TD]

[TD="align: right"]15/01/2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]

[TD="align: center"]3[/TD]

[TD="align: right"]16/01/2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"]3[/TD]

[TD="align: center"]4[/TD]

[TD="align: right"]17/04/2018[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]

[TD="align: center"]5[/TD]

[TD="align: right"]18/05/2018[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: right"]0[/TD]
[TD="align: right"]5[/TD]

[TD="align: center"]6[/TD]

[TD="align: right"]19/07/2018[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]7[/TD]

[TD="align: right"]22/08/2018[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]8[/TD]

[TD="align: right"]23/10/2018[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

[TD="align: center"]9[/TD]

[TD="align: right"]25/12/2018[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]

</tbody>
Summary

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]H2[/TH]
[TD="align: left"]=SUMIF($A:$A,$G2,C:C)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]I2[/TH]
[TD="align: left"]=SUMIF($A:$A,$G2,D:D)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,967
Members
452,371
Latest member
Frana

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