ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Sum Product (https://www.excelbanter.com/new-users-excel/192039-sum-product.html)

flds

Sum Product
 
Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS

Bernie Deitrick

Sum Product
 
flds,

In C2, enter

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

then copy down to match column A. Increase the 1000 if you have more than 1000 rows of data.

HTH,
Bernie
MS Excel MVP


"flds" wrote in message
...
Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS




T. Valko

Sum Product
 
Here's another one. Assuming your data starts on row 2.

=IF(A2<A1,SUMIF(A$2:A$10,A2,B$2:B$10),"")

BTW, your results should be 3,9,9

--
Biff
Microsoft Excel MVP


"flds" wrote in message
...
Hi

I have a problem creating a formula, can someone help.

I have a Column A with duplicate codes, in Column B with values for
each code.
I need to Sum the values of similar codes and enter into Column C same
row where the first unique occurrence appear in Column A.

Example
Code, Count, Result
AC, 1, 3
AC, 2,
ACU, 1, 9
ACU, 2,
ACU, 4,
ACU, 2,
AFU, 1, 5
AFU, 4,
AFU, 4,

I would appreciate if someone helps me with this formula.

Thanks in advance

FLDS





All times are GMT +1. The time now is 03:51 AM.

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