SUMIF with an OR

bmartin2

New Member
Joined
Aug 16, 2010
Messages
7
http://www.mrexcel.com/forum/showthread.php?p=2499135#post2499135

As a follow up to this question yesterday. Same document, same Or statment, but now I want to do this...

A1$20 B1 Registered
A2$70 B2 Walked
A3$100 B3 Ordered
A4$50 B4 Registered
A5$60 B5 Pass
A6$70 B6 Hold

I want my total to summarize the amounts in A1:A6 only when the corresponding B column says registered, ordered or hold.

Thank you all so much. Help is appreciated as always!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
You can do it in one go with a formula like this:
Excel Workbook
ABCDE
120Registered
270WalkedRegistered
3100OrderedOrdered
450RegisteredHold
560Pass240
670Hold
Sheet1
Excel 2003
Cell Formulas
RangeFormula
E5=SUMPRODUCT(SUMIF(B1:B6,D2:D4,A1:A6))

Or, if you find the individual totals useful then you can break it down like this:
Excel Workbook
ABCDE
120Registered
270WalkedRegistered70
3100OrderedOrdered100
450RegisteredHold70
560Pass240
670Hold
Sheet1
Excel 2003
Cell Formulas
RangeFormula
E2=SUMIF($B$1:$B$6,D2,$A$1:$A$6)
E3=SUMIF($B$1:$B$6,D3,$A$1:$A$6)
E4=SUMIF($B$1:$B$6,D4,$A$1:$A$6)
E5=SUM(E2:E4)


Instead of formulas, you might also find pivot tables useful.

Hope that helps...
 
Upvote 0
Or -

Code:
=SUMPRODUCT(--(ISNUMBER(MATCH($B$1:$B$6,{"Registered","Ordered","Hold"},0))),$A$1:$A$6)

hth

Mike
 
Upvote 0

Forum statistics

Threads
1,215,992
Messages
6,128,170
Members
449,429
Latest member
ianharper68

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