Link to home
Start Free TrialLog in
Avatar of Ladkisson
LadkissonFlag for United States of America

asked on

Sum Formula for selective values.

Hello!

Column A has a list of different repetitive codes and Column B has a corresponding $$ for each code. I need a function that will give me only one $$ value for each code and will exclude all others. Please refer to the attached file.
Sum-Formula-for-selected-values.xlsx
Avatar of Rgonzo1971
Rgonzo1971

HI,

pls try as Array formula (ctrl-Shft-Enter)

=SUM(B2:B14/COUNTIF(A2:A14,A2:A14))

Regards
Avatar of Ladkisson

ASKER

Sorry, I missed a step and  explained it wrong. I don't need an overall "Total".  Column "C" should have  a $$ value for each code (but only one, all others need to be excluded). Please refer to the attached file.  Thank you!!
Sum-Formula-for-selected-values.xlsx
The suggested formula did not work. The attached file has more data for you to better understand what I am looking for. I filtered on the first code to show you that your formula is still pulling both $$ amounts. And it should only be referencing one. Please advise! Thank you!
Sum-Formula-for-selected-values.xlsx
Use this formula...

=if(countif(A$1:A2,A2)=1,B2,"")

Simply drag this and it will do what you are looking for..

Saurabh...
ASKER CERTIFIED SOLUTION
Avatar of Saurabh Singh Teotia
Saurabh Singh Teotia
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial