spreadsheet - sum one column based on the value of other

Bruno,

Assuming the headers are in row A and the data is in columns 1 thru use:

=sumid(c2:c5,food)