Sum values in column that matches specific value in other column

I have the the following sheet:

Expense ---- Type ------- Price

Banana ----- Food -------- 3

Shirt --------- Clothes ---- 10

Orange ----- Food -------- 4

Hammer — Tools -------- 7

Apple -------- Food -------- 8

Pants -------- Clothes ---- 11

Now i want to show in a cell the sum of all food prices. In the example it would be 3 (banana) + 4 (orange) + 8 (apple) = 15

Use SUMIF function for this purpose. Please see last two examples of the link provided - they match your goal perfectly.

Assuming your sample table starts in A1 cell, formula could be like =SUMIF(B2:B7;”Food”;C2:C7)

Thanks, man!