SUMIFS with Criteria

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi,

I have the following tables:

Book2
DEFGHIJKLM
4Table 1Table 2Table 3Table 4
5StateSalesProductProductStateResultsResults
6Alabama500T1T1Alabama13005800
7Texas2500V5V54500
8Washinton6000H2
9Idaho7000T1
10Hawaii1200K4
11Georgia550M9
12Alabama800T1
13Oregon900B4
14Alabama4500V5
Sheet1
Cell Formulas
RangeFormula
K6:K7K6=SUMIFS(E6:E14,D6:D14,I6,F6:F14,H6:H7)
Dynamic array formulas.


1) I have my raw data in Table 1
2) In Table 2, I have my calculation criteria where I would to like to sum the sales for the state of Alabama, for product type T1 and V5
3) In table 3, I have the formula. However, it seems to spill the results in two rows instead of one
4) The correct results is in Table 4.

Is there a way to modify the formula to obtain the correct results as per Table 4 ? Appreciate all the help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Old school sumproduct
MrExcelPlayground6.xlsx
DEFGHIJKLM
4Table 1Table 2Table 3Table 4
5StateSalesProductProductStateResultsResults
6Alabama500T1T1Alabama58005800
7Texas2500V5V5
8Washinton6000H2
9Idaho7000T1
10Hawaii1200K4
11Georgia550M9
12Alabama800T1
13Oregon900B4
14Alabama4500V5
Sheet21
Cell Formulas
RangeFormula
K6K6=SUMPRODUCT(E6:E14,SIGN((D6:D14=I6)+(D6:D14=I7)),SIGN((F6:F14=H6)+(F6:F14=H7)))
 
Upvote 0
Another option
Excel Formula:
=SUM(SUMIFS(E6:E14,D6:D14,I6,F6:F14,H6:H7))
 
Upvote 0

Forum statistics

Threads
1,215,050
Messages
6,122,868
Members
449,097
Latest member
dbomb1414

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