Question posted 2009 · +6 upvotes
I need a quick an simple excel formula to get the sum of values for different types of objects as listed below:
Type1 10
Type1 10
Type1 10
Type2 10
Type2 10
Type2 10
Type2 10
Type3 10
Type3 10
Number of items and number of types are unknown (long list), in a different worksheet I would like to get sum of types like:
Sumof Type1: 30
Sumof Type2: 40
Sumof Type3: 20
I need no VBA, just simple excel formula please..
BR
Accepted answer +8 upvotes
Use a pivot table for this.
- Add a header row to your data (“data type”, “value”)
- Select your data
- Insert pivot table
- Drag “data type”-header to the Row Labels area
- Drag “value”-header to the Values area
- Make sure it says “Sum of value” and not “Count of value” in the Values area, if not you need to double-click it and change to use sum.
You could also use the “Add subtotals” feature for this, but pivot tables are more flexible and powerful.
Top excel Q&A (6)
- Shortcut to Apply a Formula to an Entire Column in Excel +335 (2011)
- How should I escape commas and speech marks in CSV files so they work in Excel? +136 (2012)
- Convert xlsx to csv in linux command line +96 (2012)
- How to create a link inside a cell using EPPlus +50 (2011)
- IF statement: how to leave cell blank if condition is false ("" does not work) +44 (2013)
- T-SQL: Export to new Excel file +44 (2012)
excel solutions on this site
.