Vertical and Horizontal Criteria Summation

brinks19

New Member
Joined
Sep 21, 2017
Messages
10
Hello All,

I need some help with the following:

I have a list of codes in column A in which some are repeated. Then I have specific codings across the top horizontally that are individual, but will not always be in the same order. I need to be able to pull the sum by matching both. I'll provide an image below of what I would like to be able to do. In this example I would want "30" to populate. Any help is much, much appreciated. Thanks!

[TABLE="width: 327"]
<colgroup><col><col><col span="3"></colgroup><tbody>[TR]
[TD] [/TD]
[TD]Horizontal[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]Vertical[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD] [/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]20[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]35[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD] [/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD] [/TD]
[TD="align: right"]30[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD] [/TD]
[TD="align: right"]35[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD] [/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Criteria[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]Vertical[/TD]
[TD]Horizontal[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]30[/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi,

Here's one way:


Book1
ABCDE
1Horizontal123
2Vertical
31101520
42152535
53203510
64251010
7130155
83352010
9240105
10
11Criteria
12VerticalHorizontal
131230
Sheet21
Cell Formulas
RangeFormula
C13=SUMPRODUCT((A3:A9=A13)*(C1:E1=B13)*C3:E9)
 
Upvote 0
[TABLE="class: grid"]
<tbody>[TR]
[TD][/TD]
[TD]
A
[/TD]
[TD]
B
[/TD]
[TD]
C
[/TD]
[TD]
D
[/TD]
[/TR]
[TR]
[TD]
1
[/TD]
[TD]Horizontal[/TD]
[TD]
1​
[/TD]
[TD]
2​
[/TD]
[TD]
3​
[/TD]
[/TR]
[TR]
[TD]
2
[/TD]
[TD]Vertical[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
3
[/TD]
[TD]
1​
[/TD]
[TD]
10​
[/TD]
[TD]
15​
[/TD]
[TD]
20​
[/TD]
[/TR]
[TR]
[TD]
4
[/TD]
[TD]
2​
[/TD]
[TD]
15​
[/TD]
[TD]
25​
[/TD]
[TD]
35​
[/TD]
[/TR]
[TR]
[TD]
5
[/TD]
[TD]
3​
[/TD]
[TD]
20​
[/TD]
[TD]
35​
[/TD]
[TD]
10​
[/TD]
[/TR]
[TR]
[TD]
6
[/TD]
[TD]
4​
[/TD]
[TD]
25​
[/TD]
[TD]
10​
[/TD]
[TD]
10​
[/TD]
[/TR]
[TR]
[TD]
7
[/TD]
[TD]
1​
[/TD]
[TD]
30​
[/TD]
[TD]
15​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
8
[/TD]
[TD]
3​
[/TD]
[TD]
35​
[/TD]
[TD]
20​
[/TD]
[TD]
10​
[/TD]
[/TR]
[TR]
[TD]
9
[/TD]
[TD]
2​
[/TD]
[TD]
40​
[/TD]
[TD]
10​
[/TD]
[TD]
5​
[/TD]
[/TR]
[TR]
[TD]
10
[/TD]
[TD]Criteria[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
11
[/TD]
[TD]Vertical[/TD]
[TD]Horizontal[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]
12
[/TD]
[TD]
1​
[/TD]
[TD]
2​
[/TD]
[TD][/TD]
[TD]
30​
[/TD]
[/TR]
</tbody>[/TABLE]

D12=SUMPRODUCT((A3:A9=$A$12)*(B1:D1=$B$12)*($B$3:$D$9))
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,279
Members
452,630
Latest member
OdubiYouth

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