Lucy89,
The tricky part here is getting the list of unique Product Codes (as I assume you do not yet have access to the new UNIQUE function).
This solution:
- Assumes your Product Codes are in A2 through A12 (as suggested by the screenshot).
- Requires that cell A15 does not contain a value which may match a Product Code.
- The longer formula with INDEX MATCH and COUNTIF is an array formula so must be entered using Ctrl-Shift-Enter so that Excel automatically generate the curly brackets. The SUMIFS just needs to be entered with the Enter key.
[TABLE="class: outer_border, width: 246"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD="align: center"][/TD]
[TD="align: center"]A
[/TD]
[TD="align: center"]B
[/TD]
[TD="align: center"]C
[/TD]
[/TR]
[TR]
[TD="align: center"]1
[/TD]
[TD="align: center"]Product Codes
[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Parts Used[/TD]
[/TR]
[TR]
[TD="align: center"]2
[/TD]
[TD="align: center"]SBR 257[/TD]
[TD="align: center"][/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD="align: center"]3
[/TD]
[TD="align: center"]FSD 014[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]4
[/TD]
[TD="align: center"]FSD 014[/TD]
[TD="align: center"][/TD]
[TD="align: center"]4[/TD]
[/TR]
[TR]
[TD="align: center"]5
[/TD]
[TD="align: center"]SBR 001[/TD]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]6
[/TD]
[TD="align: center"]SPR 385[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]7
[/TD]
[TD="align: center"]SBR 257[/TD]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]8
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]16
[/TD]
[TD="align: center"]SBR 257[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]17
[/TD]
[TD="align: center"]FSD 014[/TD]
[TD="align: center"][/TD]
[TD="align: center"]9[/TD]
[/TR]
[TR]
[TD="align: center"]18
[/TD]
[TD="align: center"]SBR 001[/TD]
[TD="align: center"][/TD]
[TD="align: center"]1[/TD]
[/TR]
[TR]
[TD="align: center"]19
[/TD]
[TD="align: center"]SPR 385[/TD]
[TD="align: center"][/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]20
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]21
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]22
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]23
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
[TR]
[TD="align: center"]24
[/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[TD="align: center"][/TD]
[/TR]
</tbody>[/TABLE]
Cell A16 contains
=IFERROR(INDEX($A$2:$A$12, MATCH(0, COUNTIF($A$15:A15, $A$2:$A$12&"") + IF($A$2:$A$12="",1,0), 0)), "")
which is entered using CTRL-Shift-Enter to generate
{=IFERROR(INDEX($A$2:$A$12, MATCH(0, COUNTIF($A$15:A15, $A$2:$A$12&"") + IF($A$2:$A$12="",1,0), 0)), "")}
Copy down to A24
Cell C16 contains
=IF(A16="","",SUMIFS($C$2:$C$12,$A$2:$A$12,A16))
Copy down to C24