Mr Mongolia
New Member
- Joined
- Dec 11, 2014
- Messages
- 2
This is my first thread so go easy on me..
I want to add multiple SUM(SUMIFS(...)) array formulas, without having to manually type SUM(SUMIFS(...))+SUM(SUMIFS(...))+ etc
Is there a way to SUM an array of array formulas?
----------------------------------------
My specific example:
[TABLE="width: 405"]
<tbody>[TR]
[TD="align: center"]
[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD]DATE:[/TD]
[TD="align: center"]01/12/2014[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]CURRENCY:[/TD]
[TD="align: center"]USD
[/TD]
[TD="align: center"]GBP[/TD]
[TD="align: center"]EUR[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]COUNTRY:[/TD]
[TD="align: center"]United Kingdom
[/TD]
[TD="align: center"]Overseas[/TD]
[TD="align: center"]
[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]DATE[/TD]
[TD]CURRENCY[/TD]
[TD]COUNTRY[/TD]
[TD]AMOUNT[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]50[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]45[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]98[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]67[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]101[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]73[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]107[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]55[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]42[/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]89[/TD]
[/TR]
</tbody>[/TABLE]
The array formula I currently have is;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2))}
i.e. the SUM of each SUMIFS based on Date and Currency - in this instance all currencies on the 01/12/14 = 293 (100+50+45+98).
I now need to include a third criteria in my SUMIFS to be based on the Country, but if I add;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,B3:C3))}
It only SUMs the SUMIFS for USD and United Kingdom + GBP and Overseas giving me 50 instead of the total 293.
I realise for this example both formulas give the same answer, but I need the flexibility in this formula to be able to apply it to many different data sets, as the criteria lists are set to change dynamically depending on several other factors.
I could just type;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,B3))+SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,C3))}
But when I have over 50 different countries this will be extremely time consuming.
Is there a better way?
Thanks
I want to add multiple SUM(SUMIFS(...)) array formulas, without having to manually type SUM(SUMIFS(...))+SUM(SUMIFS(...))+ etc
Is there a way to SUM an array of array formulas?
----------------------------------------
My specific example:
[TABLE="width: 405"]
<tbody>[TR]
[TD="align: center"]
[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]D[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD]DATE:[/TD]
[TD="align: center"]01/12/2014[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]2[/TD]
[TD]CURRENCY:[/TD]
[TD="align: center"]USD
[/TD]
[TD="align: center"]GBP[/TD]
[TD="align: center"]EUR[/TD]
[/TR]
[TR]
[TD="align: center"]3[/TD]
[TD]COUNTRY:[/TD]
[TD="align: center"]United Kingdom
[/TD]
[TD="align: center"]Overseas[/TD]
[TD="align: center"]
[/TD]
[/TR]
[TR]
[TD="align: center"]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: center"]5[/TD]
[TD]DATE[/TD]
[TD]CURRENCY[/TD]
[TD]COUNTRY[/TD]
[TD]AMOUNT[/TD]
[/TR]
[TR]
[TD="align: center"]6[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]100[/TD]
[/TR]
[TR]
[TD="align: center"]7[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]50[/TD]
[/TR]
[TR]
[TD="align: center"]8[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]45[/TD]
[/TR]
[TR]
[TD="align: center"]9[/TD]
[TD="align: right"]01/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]98[/TD]
[/TR]
[TR]
[TD="align: center"]10[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]67[/TD]
[/TR]
[TR]
[TD="align: center"]11[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]101[/TD]
[/TR]
[TR]
[TD="align: center"]12[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]73[/TD]
[/TR]
[TR]
[TD="align: center"]13[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]USD[/TD]
[TD]Overseas[/TD]
[TD="align: center"]20[/TD]
[/TR]
[TR]
[TD="align: center"]14[/TD]
[TD="align: right"]02/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]107[/TD]
[/TR]
[TR]
[TD="align: center"]15[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]Overseas[/TD]
[TD="align: center"]55[/TD]
[/TR]
[TR]
[TD="align: center"]16[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]GBP[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]42[/TD]
[/TR]
[TR]
[TD="align: center"]17[/TD]
[TD="align: right"]03/12/2014[/TD]
[TD="align: center"]EUR[/TD]
[TD]United Kingdom[/TD]
[TD="align: center"]89[/TD]
[/TR]
</tbody>[/TABLE]
The array formula I currently have is;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2))}
i.e. the SUM of each SUMIFS based on Date and Currency - in this instance all currencies on the 01/12/14 = 293 (100+50+45+98).
I now need to include a third criteria in my SUMIFS to be based on the Country, but if I add;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,B3:C3))}
It only SUMs the SUMIFS for USD and United Kingdom + GBP and Overseas giving me 50 instead of the total 293.
I realise for this example both formulas give the same answer, but I need the flexibility in this formula to be able to apply it to many different data sets, as the criteria lists are set to change dynamically depending on several other factors.
I could just type;
{=SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,B3))+SUM(SUMIFS(D5:D16,A5:A16,B1,B5:B16,B2:D2,C5:C16,C3))}
But when I have over 50 different countries this will be extremely time consuming.
Is there a better way?
Thanks