MacMost Q&A Forum • View All Forum QuestionsAsk a Question

# How Do I Search a Spreadsheet To Add All Numbers In One Column In One Month?

I am trying to sum the amount spent for food by month. I have a columns for date, code for food, and price. I usually use Excel but I think the formula setup must be universal – I just don’t know how to set up the formula. So I need to add all purchases for food over the course of a month. The list covers a number of months and has more than just food listed. Appreciate your assistance.

—–
Fran

### Comments: One Response to “How Do I Search a Spreadsheet To Add All Numbers In One Column In One Month?”

3 years ago

The function you need is SUMIFS. Look it up in the Help in Numbers.
Basically, if column A is the date, column B is the code, and column C is the amount, then the formula would look something like this:
SUMIFS(C,B,”=Food”,A,”>=1/1/17″,A,”<2/1/17")
The first parameter is the column used for the values. Then the next pair is the column to examine plus a comparison, in this case "=Food" which means that the text in that column should equal "Food." The next two pairs of parameters are matching the value in the first column to see if it is first greater than or equal to the first of January, then less than the first of February. So in other words, whether the date in A is in the month of January.
The result of the formula is the sum of only those values in C where A is in that date range and B is "Food."