SumIfs(or)?

Reddog94

Board Regular
Joined
Dec 20, 2011
Messages
52
Can an OR function be imbedded in a SumIfs function? For example, I want to do a SumIfs with two criteria, however the second criteria could be 3 different values.

For example,

Column 1 = department number
Column 2 = expense category
Column 3 = data to be summed

I want to sum all data in column 3 if column 1 = "1234" and column 2 = either "labor", "fringe", or "merit".

Using Excel 2007.
Thank you.
 
=SUMPRODUCT(--ISNUMBER(SEARCH(" "&A1&" "," "&C1:C9&" ")),D1:D9)

" "&A1&" "
How is the criteria above picking up "ship x" "x ship" and " ship "? The way it's written seems like only " ship " would calculate.

" "&C1:C9&" "
Why are the space appendings necessary for the search range?

Why is -- necessary?

Exactly what I need. Thank you Biff!
We concatenate the spaces so that we search for " ship ". This way we eliminate all of the other derivatives from being counted as "false positives".

See this for more info on the double unary minus --:

http://xldynamic.com/source/xld.SUMPRODUCT.html
 
Upvote 0

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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