Ive got a set of data in a Excel / Google Drive spreadsheet, there are 3 columns : item, price, category.
Ive included an example Google Drive Spreadsheet here - https://docs.google.com/spreadsheets/d/1JkWoQmo0qHfi8Ld5CEOGOFQtn4dXYzc4kSMEOmAxibM/edit#gid=0 (I have now locked this spreadsheet for editing as Gvee's answer works)
What im trying to do is to total the prices for each category, at the moment what im doing is filtering the category column and then finding the total by highlighting the price column see the total in the bottom right, and manually entering it.
Is there an automated way to calculate the totals for each category ?
Id like to do this using functions (rather than macros) so it can run in both Google Drive Spreadsheets as well as Excel.
In your example sheet put the following formula in cell G5
What this does is sum up values in columnn B (price) where the value in column C (category) matches the value in F5 ("alpha").
This same formula can be applied to the other categories by changing F5 to reference F6, F7, F8, etc