# Display Unique records and aggregated total by using a formula

Hi there,

1) In column A have few "Product Types"

2) In column B have "Quantity" against them

3) If possible by using a formula need to display unique Product Types and aggregated total of quantities for each product type  in Col D and Col E . For example for "Product Type 1" 105 and so on (Please see the attach file)

###### Who is Participating?

x
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.

Commented:
Use for first line:
=SUMIF(\$A\$2:\$A\$21;D2;\$B\$2:SB\$21)

0
Commented:
Hi,

A pivot table would do the trick for you.

PFA.

0
Commented:
I'm assuming you also want to get the list in columns D.....

Try this formula in D2

=IFERROR(INDEX(A\$2:A\$100,MATCH(1,INDEX((A\$2:A\$100<>"")*(COUNTIF(D\$1:D1,A\$2:A\$100)=0),0),0)),"")

[displays products in the order they occur, without duplicates]

and then in E2, SUMIF as als315 suggests, i.e.

=IF(D2="","",SUMIF(A\$2:A\$100,D2,B\$2:B\$100))

both formulas copied down as far as required. When there is no more data you get blanks, see attached. Assumes up to 100 rows of data, change as required

regards, barry
27516399.xlsx
0

Experts Exchange Solution brought to you by

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

Author Commented:
Thank u ALL als315, krishnakrkc and barryhoudini

Looking for the solution as provided by barryhoudini...Looks good i will try it and will let u know
0
Author Commented:
Thanks!
0
###### 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 Excel

From novice to tech pro — start learning today.