Advanced Sumproduct / Match

ryansm05

Board Regular
Joined
Sep 14, 2016
Messages
148
Office Version
  1. 365
Platform
  1. Windows
Hi,

I need a formula that will sum a range based on three criteria:

1) Project Code (D7:D17)
2) Region (C7:C17)
3) Period (E5:P5)

I tried a Sumproduct but it freaked out with three criteria :/ - I need this to obviously look at all three corresponding columns (dependent on whether it's Q1 etc)

https://www.dropbox.com/s/v5r0tsdksghli5w/SumHelp.xlsx?dl=0
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Maybe...

E21 copied across and down
=SUMPRODUCT(($C$7:$C$17=$C21)*($D$7:$D$17=$D21)*($E$5:$P$5=E$20),$E$7:$P$17)

M.
 
Upvote 0
Clickbait!


Book1
CDEFGHIJKLMNOP
5Q1Q1Q1Q2Q2Q2Q3Q3Q3Q4Q4Q4
6AreaCode
7P&P51574574
8R&R51
9P&P5277545454777454457457457
10P&P536547474574557
11P&P54
12R&R54
13C&C5454754745774754457
14P&P5557775447457547447
15C&C56574457477547457457
16R&R57475475475
17
18
19
20Criteria 1Criteria 2Q1Q2
21P&P52815628
22R&R5400
23R&R5705508
Sheet2
Cell Formulas
RangeFormula
E21{=SUM(IF($C$7:$C$16=$C21,IF($D$7:$D$16=$D21,IF($E$5:$P$5=E$20,$E$7:$P$16))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
Named Ranges
NameRefers ToCells
s=#REF!#REF!


WBD
 
Upvote 0
Clickbait!

CDEFGHIJKLMNOP
5Q1Q1Q1Q2Q2Q2Q3Q3Q3Q4Q4Q4
6AreaCode
7P&P51574574
8R&R51
9P&P5277545454777454457457457
10P&P536547474574557
11P&P54
12R&R54
13C&C5454754745774754457
14P&P5557775447457547447
15C&C56574457477547457457
16R&R57475475475
17
18
19
20Criteria 1Criteria 2Q1Q2
21P&P52815628
22R&R5400
23R&R5705508

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
E21{=SUM(IF($C$7:$C$16=$C21,IF($D$7:$D$16=$D21,IF($E$5:$P$5=E$20,$E$7:$P$16))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

Workbook Defined Names
NameRefers To
s=#REF!#REF!

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>



WBD

@wideboydixon

What a fantastic formula - easy to follow/understand too.

Thanks so much!
Ryan
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,531
Members
449,169
Latest member
mm424

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