Create a running total based on a category

keeln

New Member
Joined
Oct 8, 2014
Messages
2
So I am making a spreadsheet to track expenses, and I created a dropdown list for each entry to assign it a category.

What I want to do is create a running total of how much money from each of the 6 categories that I have so I know what part each category attributes to the complete total. I'll have several entries to this needs to be applied to all of them.

So for example, A1 is the category ("cat1") B1 is an amount of money. The table would continue this trend downwards. Now, based on A1 I want to add B1 to the D1. D2 would be the sum of category 2 and so on.

I can try to explain more if need be. Thanks.
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
It sounds like you have all your data in one Table, where column A is Category, column B is Amount, column C is Something, and column D is where you want the running totals based on Category. In that case, here is what I would do. Enter in cell D2 the formula =SUMIF($A$2:A2,[@Category],$B$2:B2) Copy this formula down the entire Table.

This SUMIF formula should total the values of all records above the current record plus the current record which have the same Category as the current record.

Yes, this formula should continue to work correctly if you sort or otherwise rearrange the records.

Best of luck,

G/L
 

Watch MrExcel Video

Forum statistics

Threads
1,109,437
Messages
5,528,762
Members
409,834
Latest member
vexceled

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top