AATU
AATU

Reputation: 87

How to sum columns in Excel dynamically?

I have tried forever to sum up excel columns dynamically. There are several other questions on this forum on the same subject but for some reason, I dont get them to work on my data. Here is the situation (the data is just an example, the real data includes dozens columns):

enter image description here

I would like to sum up the total of "Apple", "Banana" and "Grapes" in B3, B4 and B5, respectively but applying a dynamic formula on the data seen in I1:K9. I have tried using the following formula but it does not work:

=SUMIF(INDEX(I1:K10;MATCH(A3;I1:K1;0);0);A3;0)

Any help is highly appreciated since Im about to loose my mind over this haha.

Upvotes: 0

Views: 265

Answers (2)

P.b
P.b

Reputation: 11448

For Office365 the suggested solution by Euler's Disgraced Stepchild is the better option.

For older versions you could use: =SUM(INDEX($I$1:$K$9,0,MATCH($A2,$I$1:$K$1,0)))

Upvotes: 2

EDS
EDS

Reputation: 2195

If you have the newest version of Excel you can use FILTER.

=SUM(FILTER($I$1:$K$10, $I$1:$K$1=$A3))

Upvotes: 2

Related Questions