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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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.
 
Upvote 0
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"?
 
Upvote 0
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))
 
Upvote 0

Forum statistics

Threads
1,215,381
Messages
6,124,615
Members
449,175
Latest member
Anniewonder

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