0
votes

I have an excel table with 2 columns. First column contains a string such as A,B,C and second column contains numbers. I want to obtain sum of numbers in each row if text of first column for that row is equal to given text.

For example:

A 2
C 3
B 4
A 1
C 3

formula(A) = 3
formula(B) = 4
formula(C) = 6
and so on.

2

2 Answers

1
votes

One way to achieve this is via SubTotal option. Follow the example in this link Creating subtotals

Another way to do the same is using sumif function follow this link Sumif function

-1
votes

SUMIFS() is capable of doing this. As is SUMPRODUCT()

In european excel this would look like this. I don't know where your reference is so I am putting it in a cell named Reference.

SUMIFS($B:$B;$A:$A;"="Reference)

If you want a "running" count, then replace the arrays - from $B:$B to B$2:B2 and similar with $A:$A, and copy it down the rows.