Sum Product

F

flds

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
 
B

Bernie Deitrick

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
 
T

T. Valko

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
 

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