Excel formula: Add entries in same month and year

Brian Hamilton

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!

Scott Craner

You need to bracket the dates with greater than and less than:

=SUMIFS(Spending!C:C,Spending!D:D,C1,Spending!A:A,">=" & DATE(YEAR(D1),MONTH(D1),1),Spending!A:A,"<=" & EOMONTH(D1,0))

enter image description here


For reference Spending sheet:

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Excel formula to display ONLY month and year?

From Dev

Excel formula to set "one month/year" before?

From Dev

Add year month combination as decimals in excel

From Dev

Excel Formula or VBA to convert year, month data to actual date

From Dev

Formula to display project month & year number instead of calendar Month & Year in Excel

From Dev

Excel month formula

From Dev

SQL: How to get entries with the same month and year as the table's timestamp field?

From Dev

Excel: Array formula to sum values based on matching month and year results in value error

From Dev

How to add one month to month and year

From Dev

Add entire calender year to pivotTable in Excel from sample with only few dated entries

From Dev

How to add formula to Excel

From Dev

Selecting entries with a specific year and month from a Rails database

From Dev

Selecting entries with a specific year and month from a Rails database

From Dev

Excel formula for cumulative costs in 5 year increments

From Dev

Excel formula for declining number, in 5 year intervals

From Dev

Excel Formula to output biweekly dates and end of month

From Dev

What is the excel formula to find the upcoming Saturday a month?

From Dev

excel shortcut for month day year short date

From Dev

Excel formula to increase month by one and week in month by one

From Dev

add one month in excel into the current month

From Dev

How to get the difference of current month for the current year data and previous year same month in ssrs?

From Dev

How to calculate the difference of a month of the current year and same month from previous year in SQL

From Dev

Week of month, month of year,year

From Dev

Is it possible to declare a variable within formula and using it into same formula in excel?

From Dev

Unable to use the same formula for different rows in excel

From Dev

same formula but different result in Matlab and Excel

From Dev

Formula to convert quarter-year to MM/DD/YYYY in Excel

From Dev

Excel TEXT formula doesn't convert 'yyyy' to a year

From Dev

Excel formula - find if any date in a given range matches a given year

Related Related

  1. 1

    Excel formula to display ONLY month and year?

  2. 2

    Excel formula to set "one month/year" before?

  3. 3

    Add year month combination as decimals in excel

  4. 4

    Excel Formula or VBA to convert year, month data to actual date

  5. 5

    Formula to display project month & year number instead of calendar Month & Year in Excel

  6. 6

    Excel month formula

  7. 7

    SQL: How to get entries with the same month and year as the table's timestamp field?

  8. 8

    Excel: Array formula to sum values based on matching month and year results in value error

  9. 9

    How to add one month to month and year

  10. 10

    Add entire calender year to pivotTable in Excel from sample with only few dated entries

  11. 11

    How to add formula to Excel

  12. 12

    Selecting entries with a specific year and month from a Rails database

  13. 13

    Selecting entries with a specific year and month from a Rails database

  14. 14

    Excel formula for cumulative costs in 5 year increments

  15. 15

    Excel formula for declining number, in 5 year intervals

  16. 16

    Excel Formula to output biweekly dates and end of month

  17. 17

    What is the excel formula to find the upcoming Saturday a month?

  18. 18

    excel shortcut for month day year short date

  19. 19

    Excel formula to increase month by one and week in month by one

  20. 20

    add one month in excel into the current month

  21. 21

    How to get the difference of current month for the current year data and previous year same month in ssrs?

  22. 22

    How to calculate the difference of a month of the current year and same month from previous year in SQL

  23. 23

    Week of month, month of year,year

  24. 24

    Is it possible to declare a variable within formula and using it into same formula in excel?

  25. 25

    Unable to use the same formula for different rows in excel

  26. 26

    same formula but different result in Matlab and Excel

  27. 27

    Formula to convert quarter-year to MM/DD/YYYY in Excel

  28. 28

    Excel TEXT formula doesn't convert 'yyyy' to a year

  29. 29

    Excel formula - find if any date in a given range matches a given year

HotTag

Archive