How to find and SUM Multiple Column Data by two criteria?

knaabis

Active Member
Joined
Apr 25, 2006
Messages
254
Office Version
  1. 2013
Platform
  1. Windows
<style type="text/css">
table.tableizer-table {
font-size: 12px;
border: 1px solid #CCC ;
font-family: Arial, Helvetica, sans-serif;
}
.tableizer-table td {
padding: 4px;
margin: 3px;
border: 1px solid #CCC ;
}
.tableizer-table th {
background-color: #104E8B ;
color: #FFF ;
font-weight: bold;
}
</style>
<table class="tableizer-table">
<thead><tr class="tableizer-firstrow"><th></th><th>w</th><th>e</th><th>w</th><th>k</th><th>w</th></tr></thead><tbody>
<tr><td>A</td><td>10</td><td>5</td><td>20</td><td>4</td><td>8</td></tr>
<tr><td>B</td><td>9</td><td>4</td><td>5</td><td>4</td><td>2</td></tr>
<tr><td>C</td><td>11</td><td>3</td><td>18</td><td>9</td><td>7</td></tr>
<tr><td>D</td><td>8</td><td>2</td><td>10</td><td>3</td><td>4</td></tr>
<tr><td>E</td><td>25</td><td>1</td><td>3</td><td>3</td><td>5</td></tr>
<tr><td>F</td><td>3</td><td>1</td><td>3</td><td>3</td><td>5</td></tr>
</tbody></table>

I need SUM by two parameters - in Row side (for example) parameter A and for Column side parameter W.
Result will be 38.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hello,

With your table located in range A1:F7, you can have following Array Formula:

=SUM(IF(B1:F1="w",OFFSET((B1:F1),MATCH("A",A2:A7,0),0),0))

Hope this will help
 
Upvote 0
Another option


Book1
HIJKLMNOP
3wewkww
4A1052048A38
5B94542
6C1131897
7D821034
8E251335
9F31335
Sheet1
Cell Formulas
RangeFormula
P4=SUMPRODUCT((H4:H9=O4)*(I3:M3=P3)*(I4:M9))
 
Upvote 0
Or


A
B
C
D
E
F
G
H
I
J
1
w​
e​
w​
k​
w​
Crit1​
Crit2​
Result​
2
A​
10​
5​
20​
4​
8​
A​
w​
38​
3
B​
9​
4​
5​
4​
2​
4
C​
11​
3​
18​
9​
7​
5
D​
8​
2​
10​
3​
4​
6
E​
25​
1​
3​
3​
5​
7
F​
3​
1​
3​
3​
5​
8

Formula in J2
=SUMIF(B$1:F$1,I2,INDEX(B$2:F$7,MATCH(H2,A$2:A$7,0),0))

M.
 
Upvote 0
Hello,

With your table located in range A1:F7, you can have following Array Formula:

=SUM(IF(B1:F1="w",OFFSET((B1:F1),MATCH("A",A2:A7,0),0),0))

Hope this will help

Great!
Thanks!
 
Upvote 0

Forum statistics

Threads
1,213,527
Messages
6,114,140
Members
448,551
Latest member
Sienna de Souza

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