Ask Your Question
0

Sum values in column that matches specific value in other column

asked 2019-04-11 04:02:31 +0200

zimahaba gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-04-11 06:28:21 +0200

updated 2019-04-11 06:32:01 +0200

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)

edit flag offensive delete link more

Comments

Thanks, man!

zimahaba gravatar imagezimahaba ( 2019-04-30 02:15:07 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-04-11 04:02:31 +0200

Seen: 47 times

Last updated: Apr 11