In Cell V15

Formula: copy to clipboard
=SUMIF($B$15:$B$23,U15,$Q$15:$Q$23)


Adjust column range to meet your needs, then copy and paste down. The way your spreadsheet is set up the calcluations are done manualy (after each enter), if you want it to automatically calculate you'll have to change that in the calculation options.