Hi,

For your first category

=SUMIF(D2:D8,"=100 purchases",C2:C8)

Adjust for other codes

Ed