-2

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

3
  • @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, 2015 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, 2015 at 8:37
  • 1
    @eirikdaude: Good one. I went ahead and nominated it as a duplicate.
    – fixer1234
    Jun 9, 2015 at 8:44

1 Answer 1

0

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)

2
  • Thanks Steve. I used the below formula : '=SUMIF($A$14:$A$19,Food,$B$14:$B$19)'. But the value is Zero
    – Nitin
    Jun 9, 2015 at 8:47
  • You need quote marks around "Food" so it handles it as text, aka a String. Jun 9, 2015 at 10:24

Not the answer you're looking for? Browse other questions tagged .