ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum equal cells (https://www.excelbanter.com/excel-worksheet-functions/163976-sum-equal-cells.html)

Jaimi Blazek

Sum equal cells
 
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.


Pete_UK

Sum equal cells
 
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

On Oct 29, 7:07 pm, Jaimi Blazek <Jaimi
wrote:
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.




excelent

Sum equal cells
 
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:

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.



All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com