# Excel Question

I keep track of all my expenses in excel. In Col A-E I have date, Description, Debit, Credit, and Balance. I have various expenses budgeted throughout the entire year. I want a formula to add up all the expenses in Col C with a certain description in Col B but only through today’s date. I dont want it to pick up the budgeted expenses that are after today’s date. Is there an easy way to do this? I was trying to do a sumif function but wasnt sure how to make it only go through a certain date.

The formula I am using is =SUMIF(B:B,B7,D: D) (without the space)
Where col B is the description, B7 would be the description I want the totals for, and D is the Debits. Is there a way to add a limit to this to only search Col B through a certain date in Col A?

You can do =SUMIF(B:B,“description”,C:C) will add column C for the given description of column B. That should get you started.

Edited to add: I see you already got that far. You could probably do it with a SUMIFS statement I would think.

SUMIFS(C:C,B:B,B7,A:A,<=TODAY())?

I would cheat a little and add a column.

Cell F1 would contain =(A1<=today())&B1

If B1 contains the word hello than the result will be TRUEhello or FALSEhello depending on the whether the date is before or after today.

Then your sumif would be =sumif(F:F, Truehello, C:C)

This is how I have done it in my budgeting spreadsheet (except, way, way more complicated as I have expenses by type, month and year and track both budgeted and actuals).

ETA: When did they introduce SUMIFS? Dude, I’m old.

ETA again: It added it in 2007. I feel a little less old now.

Excel isnt liking the <=TODAY part of that equation. Tells me formula contains an error. Doesnt recognize the <= part. If I just put TODAY() it works, but that only pulls the value for that one line item and nothing else.
May just use perfectparanoia’s suggestion.

Got it to work using

=SUMIFS(C:C,B:B,B7,A:A,"<="&TODAY())

Thanks for all the help.

The easiest way would be to use filters to exclude everything you dont want to see, then total what is left (autosum or simply cover the cells you want added and look at the right side of the task bar at the bottom of the screen.)

The second easiest way would be to build a pivot table and extract from the file only what you want to see. Pivot tables show the total automatically.

Great!

SUMIFS are cool!

If only really I knew how to use them.