GRAHAMV2,

What you're looking for is the Sumif() function.
In cell E14 and copied down:
=SUMIF($C$14:$C$170,C14,$D$14:$D$170)