This seems like it should have a fairly simple solution, but I can't quite find it. Any help would be much appreciated.
I'm trying to write a formula in Excel that will refer to an itemized list of income and expenses and add up all of the entries in a given month and a given category. So if I have the following entries in one sheet: 6/15/16 Electric -$80.00 Utilities 7/1/16 Landlord -$800.00 Rent 7/2/16 McDonald's -$5.00 Fast Food 7/15/16 Electric -$80.00 Utilities 7/19/16 Water -$55.00 Utilities
I want a formula that will select and add, for example, all of the utilities from July but not from June.
Currently, I can select for category but I can't figure out how to select for the month. Here's what I'm working with:
=SUMIFS(Spending!C:C,Spending!D:D,"=Utilities",Spending!A:A,"=MONTH(D1)&YEAR(D1)")
The Spending
sheet is organized just like my above example, the C
column refers to expenses, the D
column to categories, and the A
column to dates. D1
in the last test refers to the column heading, which names this column as having to do with July 2016 expenses.
One further question, too: I'd prefer to avoid hard-coding the second test, and instead make it refer to the row heading. So instead of saying "=Utilities"
, say "=A3"
--i.e., the text value of the row header. But that way of writing it breaks the formula, and I can't figure out what else to try.
Thanks for any help!
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments