Forum Discussion
Conditional summation
I have a spreadsheet listing purchases for an ongoing home renovation. the columns list the date, store (e.g., home depot, lowes, Amazon), item name, cost, purchaser (myself or my wife).
How can I sum up all the costs only made by me or by my wife?
Similarly, how can I sum up all the costs made at each store?
2 Replies
Hello,
you can easily do this with a pivot table. Consider this screenshot. The data entry table has been turned into an Excel Table object by clicking Insert > Table. Now you can click a cell and then click Insert > PivotTable.
In the pivot table panel, drag the store to the Rows area, the purchaser to the Columns area and then drag the cost to the Values area.
When you add more data to the table in columns A to E, you can refresh the pivot table and it will automatically add new stores to the pivot table. When you use formulas, like Sumif(), you will need to type the store names manually and you might run the risk of overlooking a store.
Does that help?
- SergeiBaklanDiamond Contributor
Hi Mark,
Most straightforward way is to use SUMIF https://support.office.com/en-gb/article/SUMIF-function-169b8c99-c05c-4483-a712-1697a653039b or SUMIFS https://support.office.com/en-gb/article/SUMIFS-function-c9e748f5-7ea7-455d-9406-611cebce642b