SUMIFS: array for the exclude criteria

danhendo888

Board Regular
Joined
Jul 15, 2019
Messages
167
Office Version
  1. 365
Platform
  1. Windows
I'm wanting to Sum the Amount column using four criteria (Blue cells) in Excel (as opposed to pivot tables or PQ)

For the exclude criteria, I want to exclude Oil, Gear from column D (red cells) so that I'm only adding up the Green cells (cells colored just for visual reference)

Is it possible to use an array (like the helper column) as the exclude criteria?


Book1
ABCDEFG
1CustomerCost_CenterModelPartMonthRevenue/ExpenseAmount
2FordRaptorExhaust1R-572.2
3FordRaptorWindows1R11.55
4FordRaptorTyre1R-4259.42
5FordRaptorOil1R78.65
6FordRaptorGear1R471.82
7
8
9
10Sum: excluding Oil, Gear-4820.07
11Helper:
12Oil
13Gear
Sheet1
Cell Formulas
RangeFormula
D10D10=SUMIFS(G2:G6,A2:A6,"Ford",C2:C6,"Raptor",F2:F6,"R",D2:D6,"<>"&F12,D2:D6,"<>"&F13)
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
try this:
Excel Formula:
=SUM(IFERROR((G2:G6)/(D2:D6<>"Oil")/(D2:D6<>"Gear"),0))

or if you need the other columns assessed as well:
Excel Formula:
=SUM(IFERROR((G2:G6)*(A2:A6="Ford")*(C2:C6="Raptor")*(F2:F6="R")/(D2:D6<>"Oil")/(D2:D6<>"Gear"),0))

also here is a sumifs:
Excel Formula:
=SUMIFS(G2:G6,A2:A6,"Ford",C2:C6,"Raptor",F2:F6,"R",D2:D6,"<>Oil",D2:D6,"<>Gear")
 
Last edited:
Upvote 1
Two options: Exclude list or include list.
Book1
ABCDEFG
1CustomerCost_CenterModelPartMonthRevenue/ExpenseAmount
2FordRaptorExhaust1R-572.2
3FordRaptorWindows1R11.55
4FordRaptorTyre1R-4259.42
5FordRaptorOil1R78.65
6FordRaptorGear1R471.82
7
8
9
10Sum: excluding Oil, Gear-4820.07-4820.07-4820.07
11Exclude Helper:Include Helper
12OilExhaust
13GearWindows
14Tyre
Sheet8
Cell Formulas
RangeFormula
D10D10=SUMIFS(G2:G6,A2:A6,"Ford",C2:C6,"Raptor",F2:F6,"R",D2:D6,"<>"&E12,D2:D6,"<>"&E13)
E10E10=SUM(G2:G6)-SUM(SUMIFS(G2:G6,A2:A6,"Ford",C2:C6,"Raptor",D2:D6,E12:E13,F2:F6,"R"))
F10F10=SUM(SUMIFS(G2:G6,A2:A6,"Ford",C2:C6,"Raptor",D2:D6,F12:F14,F2:F6,"R"))
 
Upvote 1
Should also be able to make use of SUMPRODUCT:
Book1
ABCDEFG
1CustomerCost_CenterModelPartMonthRevenue/ExpenseAmount
2FordRaptorExhaust1R-572.2
3FordRaptorWindows1R11.55
4FordRaptorTyre1R-4259.42
5FordRaptorOil1R78.65
6FordRaptorGear1R471.82
7
8
9
10Sum: excluding Oil, Gear-4820.07
11Helper:
12Oil
13Gear
Sheet1
Cell Formulas
RangeFormula
D10D10=SUMPRODUCT(--(A2:A6="Ford"),--(C2:C6="Raptor"),--(F2:F6="R"),--NOT(COUNTIF(F12:F13,D2:D6)),G2:G6)
 
Upvote 1
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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