SUMPRODUCT - Matrix (Adding Multiple Columns - Criteria Top and Side)

MixedUpExcel

Board Regular
Joined
Apr 7, 2015
Messages
222
Office Version
  1. 365
Platform
  1. Windows
Hi,

Apologies if this has been covered.. I can find various posts on Sumproduct but can't quite get my head around what I need to do to get this to work.

Please can someone help me with the final part of the formula?

My table is below. This is a mock up that I can then expand across my business data.

I will have it for 12 months (2 columns per month) but I only want to add up the values under 'Sales Value' columns.

If I am just looking for a single item down the left (in this example - 1 persons name) I can get this to work. Cell F32 (with the formula showing in Cell G32)

However, I need to get the Sales Value over all of the months for the Groups - which will include (in most cases) more than 1 name per group. Cells C32 to C35

The names are determined by the groups they are in - Cells B38 to C46.

Hopefully, this table helps show what I am looking for.

BCDEFGHIJKLMN
2JANFEBMARAPEMAYJUN
3SALES VALUEQTYSALES VALUEQTYSALES VALUEQTYSALES VALUEQTYSALES VALUEQTYSALES VALUEQTY
4SIMON2081275028429219506801614166890
5MARK5312672910259516681031042136107375
6JAMES1004101179623041141080606832176632
7PAUL4757370764463499828696688451
8PETER281125346824898844641227112729131
9ANDREW9671111429768427964599213550692
10DANIEL3697843851051311422218373120587
11ROBERT9518437323711087866111268173384
12GRAHAM6076270627266126721110523097343
13SIMON83645605778027548810032923105860
14MARK90635593111331955576702114458134
15JAMES1621278109624494547375136110129
16PAUL478105601959591145116298764123
17PETER986336049345461051571285631799
18ANDREW1202876821356935102410612135126915
19DANIEL787611047255598224010728284112
20ROBERT8361793261829583212010129092531
21GRAHAM45696965871154697974188411854
22SIMON7091297998650984517994787122847
23MARK1225389114424811878113113830112531
24JAMES119293695116119949672130190669971
25PAUL2421345594443736806361036711082104
26PETER1102118891131515331984513410185
27ANDREW7584791333375482513211961242946
28DANIEL1029136568521314337644012117560
29
30
31S.V. TOTAL
32GROUP 1SIMON10698=SUMPRODUCT((E32=$B$4:$B$28)*("SALES VALUE"=$C$3:$N$3)*$C$4:$N$28)
33GROUP 2MARK13372
34GROUP 3PETER8900
35GROUP 4DANIEL11555
36
37
38SIMONGROUP 1
39MARKGROUP 2
40JAMESGROUP 3
41PAULGROUP 4
42PETERGROUP 3
43ANDREWGROUP 1
44DANIELGROUP 4
45ROBERTGROUP 2
46GRAHAMGROUP 3
47

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>
</tbody>

Final note, I can't simply SUM the Sales Values in a final column as the amount of data changes on a weekly basis.

Thanks for any help I can get with this.

Simon
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Maybe...

Array formula in C32 copied down
=SUM(IF(ISNUMBER(MATCH(B$4:B$28,IF(C$38:C$46=B32,B$38:B$46),0)),IF(C$3:N$3="SALES VALUE",C$4:N$28)))
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.
 
Upvote 0
Maybe...

Array formula in C32 copied down
=SUM(IF(ISNUMBER(MATCH(B$4:B$28,IF(C$38:C$46=B32,B$38:B$46),0)),IF(C$3:N$3="SALES VALUE",C$4:N$28)))
confirmed with Ctrl+Shift+Enter, not just Enter

Hope this helps

M.

Hi Marcelo,

That wasn't what I was expecting. I thought I would have got an extension to the SUMPRODUCT formula.

That being said. Your solution works perfectly, thank you very much for getting back to me so quickly with a working solution.

Really appreciate your time on this.

If anyone else looking at this in the future comes up with a SUMPRODUCT solution, please can you let me know as it will help with my learning of this function.

Thank you again Marcelo.

Simon
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

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