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

# 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)

0
masmatc
1 Solution

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

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