SUMIF with multiple conditional criteria?

emustyle

New Member
Joined
Oct 19, 2012
Messages
2
Hey All,

Am a first time poster but have found "lurking" to be extremely helpful for my "day-to-day" work! I think I've finally run into something that I can post about so hopefully its worthy of the mr.excel boards ;)

I am trying to work with a SUMIF statement:
=SUM(SUMIF($C:$C,{"ABC","CBA","BCA",ACB"},D:D))

What It does is look in column C:C to see if there is matching criteria and sum the corresponding cells in the D:D range.
What I'd like to do is have my criteria (in the curly brackets) actually reference a cell so that I can make my criteria variable.

The end result I'm looking for is something a long the lines of =SUM(SUMIF($C:$C,{H3},D:D)) Where H3 is "ABC","CBA","BCA",ACB"

I've tried doing things like putting each criteria into its own cell, however everytime I attempt to reference a cell I get an excel error (The formula you typed contains an error)

I had looked at Sumifs but I believe (and I could be wrong) that all the criteria within SUMIFs use an "AND" operator vs. an "OR" operator which I'm seeking.

Also if there's a more efficient way of doing this, I would also entertain completely changing my formulas!

Any help you guys can provide, would be greatly appreciated
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Welcome to the board

Try
=SUMPRODUCT(SUMIF($C:$C,$G$1:$G$4,D:D))

G1 = ABC
G2 = CBA
G3 = BCA
G4 = ACB


Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,215,634
Messages
6,125,938
Members
449,275
Latest member
jacob_mcbride

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