EXCEL SUMIFS formula of two columns removing dupliate entries

HI Guys

Hope you can help

Ive been trying to use SUMIF, SUM PRODUCT with FREQUENCY and MATCH to sum the quantities in stock locations but ignoring duplicate entries

I have column A and Column B - column A has the stock location which can be repeated several times with the unique stock quantity against the location in Column B

Ive tried creating a formula to sum the quantities in Column B but only for each unique location so for example, if in column A Stock Location PB12345 is repeated 6 times and has a quantiity of 500 - when the SUMIF runs through the the two columns, it only includes the sum of 500 from PB12345 once and not include the six times its repeated

Ive attached a sample file and the desired result in cell F1 - the formula im using shows how many times its repeated but not the sum ?

If you could help I would be very grateful

J
Jase AlexanderCompliance ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You may try this Array Formula which requires confirmation with Ctrl+Shift+Enter instead of Enter alone.

=SUM((FREQUENCY(MATCH(A2:A10,A2:A10,0),ROW(A2:A10)-ROW(A2)+1)>0)*B2:B11)

Open in new window

Change the range reference as per your requirement and remember to exceed the range reference by one cell from column B as you can see that the referred range from column A is A2:A10 but range referred from column B is B2:B11.

UniqueSum.jpg

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jase AlexanderCompliance ManagerAuthor Commented:
HI Subodh

Thanks so much for this - works perfect !!

J
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Jase! Glad it worked as desired.
Thanks for the feedback.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Office

From novice to tech pro — start learning today.