Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • Data Series in Excel
  • Get column index in Excel Table
  • Randomize/ Shuffle List in Excel
  • Move chart to a separate worksheet in Excel
  • Chart Axes in Excel

References

  • How to use Excel MMULT Function
  • Complete List of Excel Lookup and Reference Functions, References and Examples
  • How to get last column number in range in Excel
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation
  • Count rows with at least n matching values

Data Validations

  • Excel Data validation require unique number
  • Excel Data validation must not contain
  • Data validation must not exist in list
  • Excel Data validation exists in list
  • How To Create Drop-down List in Excel

Sum by month in Excel

by

This tutorial shows how to Sum by month in Excel using the example below;

Formula

=SUMIFS(values,date_range,">="&A1,date_range,"<="&EOMONTH(A1,0))

Explanation

To sum by month, you can use a formula based on the SUMIFS function, with help from the EOMONTH function. In the example shown, the formula in F4 is:

=SUMIFS(amount,date,">="&E4,date,"<="&EOMONTH(E4,0))

This formula uses the named ranges “amount” (C4:C9) and “date” (B4:B9).

How this formula works

The SUMIFS function can sum values in ranges based on multiple criteria.

In this case, we configure SUMIFS to sum amounts by month using two criteria: one to match dates greater than or equal to the first day of the month, one to match dates less than or equal to the last day of the month. In other words, we need a formula like this:

=SUMIFS(amount,date,">="&"1/1/2016",date,"<="&"1/31/2016")

Or the the more bulletproof alternative:

=SUMIFS(amount,date,">="&DATE(2016,1,1),date,"<="&DATE(2016,1,31))

This version is more robust because dates are constructed with separate year, month, and day values, and not entered as text that needs to be interpreted by Excel.

Worked Example:   How to conditionally sum numeric data in an Excel table using SUMIFS

Normally, this is a pain, because if you add month names as text (i.e. “January”, “February”, “March”, etc.) in column E you have to go to extra trouble to create dates you can use for criteria. However, in this case, we use a simple trick to make things easy: In column E, instead of typing month names, we add actual dates (1/1/2016, 2/1/2016, 3/1/2016), then use a custom date format (“mmmm”) to display the month names.

Worked Example:   Sum if cell contains text in another cell in Excel

This makes it easy to build the criteria we need for SUMIFS. To match dates greater than or equal to the first of the month, we use:

">="&E4

And to match dates less than or equal to the last day of the month, we use this:

"<="&EOMONTH(E4,0)

With zero for months, the EOMONTH function automatically returns the last day of the month provided by the date.

Worked Example:   Calculate expiration date in Excel

The concatenation with an ampersand (&) is necessary when building criteria that use a logical operator with a numeric value.

Post navigation

Previous Post:

44 Practical Excel IF function Examples

Next Post:

Large with criteria in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • Check multiple cells are equal in Excel
  • How to use Excel TRUE Function
  • TRUE function: Description, Usage, Syntax, Examples and Explanation
  • OR function Examples in Excel
  • Extract multiple matches into separate rows in Excel

Date Time

  • Count holidays between two dates in Excel
  • Get last weekday in month in Excel
  • How to determine year is a leap year in Excel
  • Convert decimal hours to Excel time
  • NETWORKDAYS function: Description, Usage, Syntax, Examples and Explanation

Grouping

  • Group numbers at uneven intervals in Excel
  • Running count group by n size in Excel
  • Map inputs to arbitrary values in Excel
  • Map text to numbers in Excel
  • How to randomly assign data to groups in Excel

General

  • How to create dynamic named range with INDEX in Excel
  • Count cells that contain errors in Excel
  • List worksheet index numbers in Excel
  • Mark Workbook as Final in Excel
  • Select, Insert, Rename, Move, Delete Worksheets in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning