Sum equal cells

G

Guest

Hello.

I currently have this:

Column A Column B Column C

James 5
Kyle 6
Mark 2
Mark 1
James 1
Kyle 4
Adam 5
Adam 1

How do I have Column C be a sum of the numbers in Column B if the "names" in
Column A match, without having the sum of each matching "name" duplicate ( I
only want ONE subtotal for each set of a matching "name" from column A
reflecting the related number from column B)

Thanks.
 
P

Pete_UK

Try this in C1:

=IF(COUNTIF(A$1:A1,A1)=1,SUMIF(A$1:A$100,A1,B$1:B$100),"")

and copy down. I've assumed 100 rows of data - adjust in the SUMIF
function if necessary.

Hope this helps.

Pete
 
G

Guest

INSERT IN C2 AND COPY DOWN

=IF(COUNTIF($A$2:A2,A2)=1,SUMPRODUCT(($A$2:$A$9=A2)*($B$2:$B$9)),"")


"Jaimi Blazek" skrev:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top