Nesting =SUMIF

smithgt

Board Regular
Joined
Jan 22, 2010
Messages
193
Is it possible to use =SUMIF on two criteria being met?

My current formula is

=SUMIF($I:$I,"X",M:M)

but I'd like to add another condition that of

IF I="X" and K="Australia" then SUM the value in M

Thanks
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
I'm not sure I understand.

What do you mean by mutliplying a value by a text field?

You are only summing up the numbers in column M.

I have tested the formula myself and it works fine - (Column I contained X, Y, Z. Column K contained Australia, England, Germany. Column M contained random numbers).

<table style="width: 229px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 33pt;" width="44"> <col style="width: 11pt;" width="15"> <col style="width: 45pt;" width="60"> <col style="width: 11pt;" width="14"> <col style="width: 43pt;" width="57"> <col style="width: 29pt;" width="39"> <tbody><tr style="height: 12.75pt;" height="17"><td class="xl24" style="height: 12.75pt; width: 33pt;" width="44" height="17">Letter</td><td class="xl24" style="width: 11pt;" width="15">
</td><td class="xl24" style="width: 45pt;" width="60">Country</td><td class="xl24" style="width: 11pt;" width="14">
</td><td class="xl24" style="width: 43pt;" width="57">Number</td><td class="xl24" style="width: 29pt;" width="39">Total</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Australia</td><td>
</td><td align="right">123</td><td align="right">941</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Australia</td><td>
</td><td align="right">4</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Australia</td><td>
</td><td align="right">125</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Y</td><td>
</td><td>Australia</td><td>
</td><td align="right">15</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Y</td><td>
</td><td>England</td><td>
</td><td align="right">661</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Y</td><td>
</td><td>England</td><td>
</td><td align="right">1</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Y</td><td>
</td><td>Germany</td><td>
</td><td align="right">2</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Z</td><td>
</td><td>Germany</td><td>
</td><td align="right">6</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Z</td><td>
</td><td>Germany</td><td>
</td><td align="right">6</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Z</td><td>
</td><td>Germany</td><td>
</td><td align="right">7</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Z</td><td>
</td><td>Germany</td><td>
</td><td align="right">32</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">Z</td><td>
</td><td>Germany</td><td>
</td><td align="right">3</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Germany</td><td>
</td><td align="right">26</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Germany</td><td>
</td><td align="right">1</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>England</td><td>
</td><td align="right">2</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Australia</td><td>
</td><td align="right">23</td><td>
</td></tr><tr style="height: 12.75pt;" height="17"><td style="height: 12.75pt;" height="17">X</td><td>
</td><td>Australia</td><td>
</td><td align="right">666</td><td>
</td></tr></tbody></table>
 
Last edited:
Upvote 0
Are you using Excel 2007 or later? If so, you can use the SUMIFS function, which allows multiple criteria.

If not, look at the thread I linked, specifically my post and link to the explanation on how the SUMPRODUCT function works.
 
Upvote 0
Thanks All,

I resolved my #Values error by adjusting the range to start at row 3. The top two rows coantained labels.

:-)
 
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,572
Members
452,927
Latest member
whitfieldcraig

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