Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a form with Google Spreadsheet where I want to collect grocery expenses for different people. How can I sum the expenses for different persons? Each row has a column with the person's name and the amount spent.

Let me give an example for the problem:


A      B
Name Amount
Me    1 
You   2
Me    3
Me    4
You   5

I want to SUM column B where column A = "Me" so the result is 8.

share|improve this question

migrated from superuser.com Feb 22 '11 at 14:35

This question came from our site for computer enthusiasts and power users.

up vote 17 down vote accepted

You can use the SUMIF function to calculate the total sum for each person.

If you enter the following formula in a cell you like, it will give you the total amount spent by "Me":


where A2:A6 is the Range, "=Me" is the Criteria, and B2:B6 is the Sum_Range.

share|improve this answer
Here's how to get a list of available functions – none Feb 23 '11 at 7:50
For this to work in non-US locales you need to use ";" instead of "," in the statement above. Otherwise you'll get an "#ERROR!". – Emil Stenström Feb 20 '13 at 9:27
@EmilStenström: True. I have Turkish locale and I always use ; in Excel formulas. Additionally, if you work with macros in Excel, you always have to use , for formulas in your code even if you have non-US locales. – Mehper C. Palavuzlar Feb 20 '13 at 20:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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