Sum with changing range

evanc123

New Member
Joined
Apr 19, 2018
Messages
3
Dear All,

I am wondering if it's possible to generate a formula that will give me the following desired result:

A16AX
C7BX
B3CZ

<tbody>
</tbody><colgroup><col span="6"></colgroup>


Is it possible to get the answer 23 (16+7) with some kind of SUMIF formula for "X", then maybe an offset to collect results "A" and "B" which are adjacent to "X", then find the total for A+B in another column?


<tbody>
</tbody><colgroup><col span="2"></colgroup>

<tbody>
</tbody><colgroup><col span="2"></colgroup>
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Assuming that is columns A:D

Your first formula: =SUM(SUMIF(A:A,{"A","B"},B:B))
Your second formula: =SUM(SUMIFS(B:B,C:C,{"A","B"},D:D,"X"))


Excel 2010
ABCDEFG
1A16AX1923
2C7BX
3B3CZ
4
Sheet1
Cell Formulas
RangeFormula
F1=SUM(SUMIF(A:A,{"A","B"},B:B))
G1=SUM(SUMIFS(B:B,C:C,{"A","B"},D:D,"X"))
 
Upvote 0
Row\Col
A​
B​
C​
D​
E​
F​
G​
H​
I​
1​
A
16
AXxz
2​
C
7
BX
19​
7​
3​
B
3
CZ

In H2 control+shift+enter, not just enter, and copy across to G2...

=SUM(SUMIFS($B$1:$B$3,$A$1:$A$3,IF($F$1:$F$3=H1,$E$1:$E$3)))
 
Upvote 0

Forum statistics

Threads
1,215,473
Messages
6,125,020
Members
449,203
Latest member
tungnmqn90

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