• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

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)

Please suggest

Add-Quantity.xlsx
0
masmatc
Asked:
masmatc
1 Solution
 
als315Commented:
Use for first line:
=SUMIF($A$2:$A$21;D2;$B$2:SB$21)

0
 
krishnakrkcCommented:
Hi,

A pivot table would do the trick for you.

PFA.

Kris Add-Quantity.xlsx
0
 
barry houdiniCommented:
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
 
masmatcAuthor 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
 
masmatcAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now