# Need to sum values associated with specific words, in Excel [duplicate]

I want to sum values associated with specific words. For example, calculate Sum for Food:

``````Column A        Column B
Food             \$8.50
Food             \$5.10
Maintenance      \$12.00
Laundry          \$13.00
Loan             \$1,213.25
Tution           \$100.00
``````

The result would be \$13.60.

Please let me know which formula I can use

• @eirikdaude: That question seeks to compile the sums for all values in column A, which has different answers than summing for a single value. – fixer1234 Jun 9 '15 at 8:27
• @fixer1234 The question looks identical to me? "I need to look up names from column 1 then sum numbers from column 2" (basically). I.e. do a `SUMIF` for each of the words in column 1. Apart from that it is trivial to find other answers which tells people how to use `SUMIF`, e.g. this one: superuser.com/questions/518284/… – eirikdaude Jun 9 '15 at 8:37
• @eirikdaude: Good one. I went ahead and nominated it as a duplicate. – fixer1234 Jun 9 '15 at 8:44

You can use the `SUMIF` function as below. You can replace 'Food' with any other word, or preferably a reference to another cell which tells it what word to look for. It looks for the value in column `A`, then sums the corresponding values from `B`.
`=SUMIF(\$A\$2:\$A\$7,"Food",\$B\$2:\$B\$7)`