SUMIF Formula including OR

garymu16

Board Regular
Joined
Sep 15, 2006
Messages
139
Dear All,

How do I modify my formula (below) to include an OR statement?

=SUMIF(I4:I20,"Core",G4:G20)

I need something like this:

=SUMIF(I4:I20,"Core" or "Existing",G4:G20)

I know this will no-doubt be embarassingly easy but I can't get my head around it.

Thx in advance
Gary
 
When I did the testing, the referenced ranges were huge and I think I used 100 formulas in the sheet. So if you only have 1 formula which references a range of 100 cells you really wouldn't notice any difference.

The thing I really took from this is that using:
Code:
=SUM(SUMIF($A$2:$A$30000,{"Word1";"Word2";"Word3";"Word4";"Word5"},$B$2))
 
or, if you are using a range list:
 
=SUMPRODUCT(SUMIF($A$2:$A$30000,List_Range,$B$2:$B$30000))

seem to be a very nice variations instead of using
=SUMIF + SUMIF + SUMIF + SUMIF....

because it shortens the formula such a huge amount and with practically no overhead.
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Nothing to add, just thought I'd pipe up and say thanks to Colin & co. as I found this an interesting thread ... and have tucked away for future reference ;-)

Like Jon I wish I knew how/why/when the mechanics behind one formula would be more efficient than another... maybe one day...

For one conditional SUM with a variable criteria value I have in the past used the SUM(SUMIF(...,{ },...)) approach ... and in a way I'm glad that I've not been using a hideously inefficient approach :-)
 
Upvote 0
I was just reading this old thread and noticed that I posted a formula in post #5 which had some discussion in posts #6-#9:

=SUM(SUMIF(I4:I20,{"Core","Existing"},G4))

This formula isn't very good because the size of sum_range (G4) doesn't match range (I4:I20). This means that the formula is volatile.
It should be written as:

=SUM(SUMIF(I4:I20,{"Core","Existing"},G4:G20))
 
Upvote 0

Forum statistics

Threads
1,222,647
Messages
6,167,329
Members
452,110
Latest member
eui

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