I use Google Sheets to keep track of my expenses. The file currently consists of:

  • Sheet 1: "Expense Types"
  • Sheet 2: "2015 Details".

The first column of Sheet 1 contains the list of admissible expense types, and each row in Sheet 2 details one single expense: data, notes, type and amount.

I would like to create a new Sheet 3: "2015 Summary" that would contain, on each row, a single expense type and the sum of all expenses of the given type. Moreover, I want this sheet to automatically update in case I add a new expense type on Sheet 1.

Is it possible to do this using worksheet formulas or do I need to do some scripting?


You can use a pivot table to do that. Choose Data > Pivot from the menus, and follow the prompts to set it up.

There's an example of something similar here: https://docs.google.com/spreadsheets/d/1VIeA4zAjID0y1jo1FnsbfGA4qmpRgAxMykLXi1pOfhc/edit?usp=sharing

|improve this answer|||||
  • You need to set up Sheet 2 so that it automatically reads from Sheet 1. (If you don't do this, then there is not point in having sheet 2.) – MaryC.fromNZ Aug 22 '17 at 16:57
  • Yes, Sheets 2 and 3 could operate completely independently. But this would not be a smart way to have a spreadsheet set up. – MaryC.fromNZ Aug 28 '17 at 12:52

This is a good use case for the SUMIF function. An example is illustrated below:

SUMIF Example

|improve this answer|||||
  • 1
    This isn't done using a pivot table, these are just cells. To reference other sheets, you would use the 'SheetName'!A1 syntax. – contracode Aug 23 '17 at 12:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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