Possible Duplicate:

Sum Values in One Range Based on Criteria in Another

I have several columns in a spreadsheet with *date*, *item*, *order* etc. but also 2 columns:

- Column
`K`

-*Owed By* - Column
`L`

-*Owed Amount*

In column `K`

there will be a couple of different names, say, "Joe" and "Andy", and in column `L`

will be the amount they owe for a particular item.

In another Column, I have *Totals for Each Name*, and I basically need a formula that will look at Column `K`

see if the name is "Joe" and add the total he owes; then I will change the formula for other names.

Any idea how to go about this?