Excel subtotals

Last Edited By Krjb Donovan
Last Updated: Mar 05, 2014 09:33 PM GMT

Question

Is it possible to perform a subtotal on more than one category. For example I want to total expenses based on unitID and item#. I have 5 columns. Unit, Item#, Price, Quantity, Total Expense. I want to subtotal if the unit is 2200 and the item is 2A, then subtotal that; then if the unit is 2200 and the item is 2B then subtotal that; or if the unit is 2500 and the item is 2A that would be another subtotal. Can this be done? I am good withbut lost in VBA.

Answer

You don't need VBA for this. Just put all of your data into a PivotTable. You can create multiple subtotals very easily using a PivotTable.

Advertisement

©2021 eLuminary LLC. All rights reserved.