Help with SUMIFS with Multiple Criteria in and out of Same Column

Channielynn

New Member
Joined
Jan 7, 2015
Messages
13
I need a SUMIF or SUMIFS formula to pull the total I am needing from the example order below. Every order has at least one of 4 document and/or freight charges when it feeds onto the spreadsheet. What I need is a way to extract the amounts without these charges. All of the data in question is remaining on the same sheet.
Additional information, the issue I have having is with the total for Branch/Plant ABC. I need the total extended price from that column without the last 4 rows showing in the totals (INTL, HPP, etc).

What I have tried –

=SUMIFS(F:F,H:H,”ABC”,A:A,{“ <>HPP”,”<>INTL”,…})

The problem is it is not removing all of these, one or more are still feeding into my total.

Item NumberQuantity ShippedUofMDescription 1Unit PriceExtended PriceExtended WeightBranch / PlantLot Number
123200BGPROD 15.001000.0010,000.00ABC01JAN05A1
456150EAPROD 25.00750.00750.00ABC01JAN05A2
78922BGPROD 35.00110.001,100.00DEF01JAN05A3
14736BGPROD 45.00180.001,800.00DEF01JAN05A4
25870CSPROD 55.00350.00840.00ABC01JAN05A5
36958BGPROD 65.00290.002,900.00GHI01JAN05A6
987-12118BGPROD 75.00590.005,900.00GHI01JAN05A7
654-235KNPROD 85.0025.0025.00ABC01JAN05A8
258-7423KNPROD 95.00115.00115.00ABC01JAN05A9
HPP1EAHEALTH DOCUMENTS2,000.002000.00 ABC
INTL1EAINTERNATIONAL DOCUMENTS60.0060.00 ABC
ASSAY-PROF1EAASSAY PROFILE1,000.001000.00 ABC
FRT1EAFREIGHT CHARGE100.00100.00 ABC

<tbody>
</tbody><colgroup><col span="3"><col><col span="4"><col></colgroup>
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
You can't do a criteria of multiple NOT Equal in Sumifs like that.

You'd have to create a seperate criteria for each
=SUMIFS(F:F,H:H,"ABC",A:A,"<>HPP",A:A,"<>INTL")

If there's alot of those NOT equal criteria, I'd suggest sumproduct
=SUMPRODUCT(--(H1:H100="ABC"),--(ISERROR(MATCH(A1:A100,{"HPP","INTL"},0))),F1:F100)


I highly recommend NOT using entire column references like H:H in sumproduct.
 
Upvote 0
I appologize, let me clarify, I use the range of cells not rows, I was keeping my example simple so it didn't look cluttered, so sorry for the confusion.

There 4 NOT equal criteria (all 4 are the last 4 rows above), so I would assume I would just add the other two in the example above as ,{"HPP","INTL","ASSAY-PROF","FRT"},

Also, the -- you use, I keep those in there so in my actual spreadsheet I have...

=SUMPRODUCT(--(H37:H236="ABC"),--(ISERROR(MATCH(A37:A236,{"HPP","INTL","FRT","ASSAY-PROF"},0))),F37:F236)

However, now I am getting zero, but I am not getting any errors.
 
Last edited:
Upvote 0
My guess would be the numbers in F37:F236 are not really numbers, maybe they're 'numbers stored as text'

Does this give a result?
=SUMPRODUCT(--(H37:H236="ABC"),--(ISERROR(MATCH(A37:A236,{"HPP","INTL","FRT","ASSAY-PROF"},0))),--(F37:F236))
 
Upvote 0
I got it to work with the first formula you gave me, switching the rows for cells and adding the two remaining paper lines... thank you so much for the help, much appreciated :)

Chandra
 
Upvote 0

Forum statistics

Threads
1,215,327
Messages
6,124,290
Members
449,149
Latest member
mwdbActuary

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