Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

marked as duplicate by Sathya Jun 3 '12 at 8:59

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

1 Answer

up vote 2 down vote accepted

Using the SumIf formula would be appropriate in this case.

=SumIf(K:K,"Joe",L:L)

would get you the sum over all the cells that match with "Joe"

If you have lots of names it can be tedious to edit the second term in the formula: you can also use a cell reference here. If you have a list of (unique) names you want to find the totals for in -say- M5:M25 you can enter the formula

=SumIf(K:K, M5, L:L)

in N5 and then copy it down through the range N5:N25

share|improve this answer
    
Perfect, thanks Jonsca –  Mark Aug 5 '11 at 15:08
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.