N equation in Numbers that will give me the sum of numbers based on a separate column

iworknumbers

I'm trying to find out if there is a way to create an equation that looks at one column, if it is equal to a certain value, then add the value in the other column?

Example:

#Table of running values:

Type     Cost
-------------
A        $4
B        $2
B        $1
A        $6

I'd like to be able to create another table that results with this:

# Summation of each type

Type     Total
--------------
A        $10
B        $3

Any help in setting up an equation to do this summation would be helpful.

Best Answer

I figured it out. The method is called =SUMIF(). I am so happy. :)