Is there an alternative to SUMIFS for my example?

Mr. Snrub

Board Regular
Joined
May 22, 2005
Messages
150
Office Version
  1. 365
Platform
  1. Windows
I have a "Data" Excel table that i need to have columns summed up with multiple criteria and presented on two "Summary" Excel tables.

"DataTable" Table:

<table>
<tr>
<th>Date</th>
<th>Transaction Type</th>
<th>Contribution Type</th>
<th>Quantity</th>
</tr>
<tr>
<td>7/12/2018</td>
<td>sp</td>
<td>ec</td>
<td>23.56</td>
</tr>
<tr>
<td>7/12/2018</td>
<td>sp</td>
<td>aa</td>
<td>1.101</td>
</tr>
<tr>
<td>7/12/2018</td>
<td>sp</td>
<td>am</td>
<td>4.4059</td>
</tr>
<tr>
<td>7/13/2018</td>
<td>lt</td>
<td>ec</td>
<td>3.298</td>
</tr>
</table>

"TransactionTypeSummary" Table:

<table>
<tr>
<th>Date</th>
<th>lt Total (Formula)</th>
<th>lt Total (Result)</th>
<th>sp Total (Formula)</th>
<th>sp Total (Result)</th>
</tr>
<tr>
<td>7/12/2018</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Transaction Type],"lt")</td>
<td>0</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Transaction Type],"sp")</td>
<td>29.0669</td>
</tr>
<tr>
<td>7/13/2018</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Transaction Type],"lt")</td>
<td>3.298</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Transaction Type],"sp")</td>
<td>0</td>
</tr>
</table>

"ContributionTypeSummary" Table:

<table>
<tr>
<th>Date</th>
<th>ec Total (Formula)</th>
<th>ec Total (Result)</th>
<th>aa Total (Formula)</th>
<th>aa Total (Result)</th>
<th>am Total (Formula)</th>
<th>am Total (Result)</th>
</tr>
<tr>
<td>7/12/2018</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"ec")</td>
<td>23.56</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"aa")</td>
<td>1.101</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"am")</td>
<td>4.4059</td>
</tr>
<tr>
<td>7/13/2018</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"ec")</td>
<td>3.298</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"aa")</td>
<td>0</td>
<td>SUMIFS(DataTable[Quantity],DataTable[Date],[@Date],DataTable[Contribution Type],"am")</td>
<td>0</td>
</tr>
</table>

For each summary table, for the match to occur, the row's date has to match and the type has to match as well. Is there an alternate way to sum these values without using the very slow SUMIFS function?
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
[TABLE="width: 1121"]
<colgroup><col><col><col><col><col><col><col span="8"></colgroup><tbody>[TR]
[TD]Date[/TD]
[TD]Transaction Type[/TD]
[TD]Contribution Type[/TD]
[TD]Quantity[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/07/2018[/TD]
[TD]sp[/TD]
[TD]ec[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/07/2018[/TD]
[TD]sp[/TD]
[TD]aa[/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/07/2018[/TD]
[TD]sp[/TD]
[TD]am[/TD]
[TD="align: right"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]12/07/2018[/TD]
[TD]lt[/TD]
[TD]ec[/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13/07/2018[/TD]
[TD]sp[/TD]
[TD]aa[/TD]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13/07/2018[/TD]
[TD]lt[/TD]
[TD]am[/TD]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13/07/2018[/TD]
[TD]sp[/TD]
[TD]ec[/TD]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]13/07/2018[/TD]
[TD]lt[/TD]
[TD]am[/TD]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]sp[/TD]
[TD]sp[/TD]
[TD]sp[/TD]
[TD]lt[/TD]
[TD]lt[/TD]
[TD]lt[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ec[/TD]
[TD]aa[/TD]
[TD]am[/TD]
[TD]ec[/TD]
[TD]aa[/TD]
[TD]am[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]12/07/2018[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]5[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]13/07/2018[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 3"]formula giving 2 to the right of 12/7/18[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="colspan: 8"]=SUMPRODUCT(($A$2:$A$9=$F15)*($B$2:$B$9=G$12)*($C$2:$C$9=$G13)*($D$2:$D$9))[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Is there an alternate way to sum these values without using the very slow SUMIFS function?
I would count SUMIFS as quite a fast function.
What makes you say it is slow?
How big are your tables?
Are you sure you don't have other functions that might be slowing your sheet down more than the SUMIFS?


=SUMPRODUCT(($A$2:$A$9=$F15)*($B$2:$B$9=G$12)*($C$2:$C$9=$G13)*($D$2:$D$9))
Whilst SUMPRODUCT can do the same job as SUMIFS, in my testing it is slower than SUMIFS, and it is calculation time that seems to be the problem for the OP.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,749
Messages
6,167,958
Members
452,158
Latest member
MattyM

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