Dynamic formula for summing multiple rows and columns

atlanticdam

New Member
Joined
Aug 30, 2018
Messages
2
Hello forum, I'm trying to figure out a dynamic formula that will sum all A that is between 1/2019 and 12/2021. Answer should be 220. Would appreciate any pointers.
TypeDec-19Sep-20Jun-21Mar-22Dec-22Jun-23Jun-24Jun-25
A 73 35
A 38 74
B 74 56
B 44 8
B 36 45
B 24
B 33
C 51
C 1 52 52
C 32
C 22
D 25 25 25 25

<tbody>
</tbody>
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
Control+shift+enter, not just enter:

=SUM(IF($B$1:$I$1>=K2,IF($B$1:$I$1<=K3,IF($A$2:$A$13=K1,$B$2:$I$13))))

where K2 is 1/2019, K3 12/2021, and K1 A.
 

atlanticdam

New Member
Joined
Aug 30, 2018
Messages
2
I don't fully understand how the arguments, but it worked like a charm, thanks.

Would it be possible to construct a formula using "Sumif" or "Sumifs"?
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,209
I don't fully understand how the arguments, but it worked like a charm, thanks.

You are welcome. It's an array-processing formula.

Would it be possible to construct a formula using "Sumif" or "Sumifs"?

No. The data you have requires array-processing. That is,

either, confirmed with control+shift+enter...

=SUM(IF($B$1:$I$1>=K2,IF($B$1:$I$1<=K3,IF($A$2:$A$13=K1,$B$2:$I$13))))

or, confirmed with enter...

=SUMPRODUCT($B$2:$I$13,($B$1:$I$1>=K2)*($B$1:$I$1<=K3)*($A$2:$A$13=K1))
 

Forum statistics

Threads
1,136,339
Messages
5,675,199
Members
419,553
Latest member
hanahass

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
Top