Excel guide · 4 min read
How to sum by month in Excel
=SUMIFS($D$2:$D$11,$A$2:$A$11,">="&F2,$A$2:$A$11,"<"&EOMONTH(F2,0)+1) and fill down. It adds every amount dated from the 1st of that month up to, but not including, the 1st of the next.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Date | Customer | Category | Amount | Month | Total | |
| 2 | Sep 18, 2025 | Brightside Ltd | Service | 1200 | Aug 1, 2026 | ||
| 3 | Aug 4, 2026 | Kemp Studio | Product | 640 | Sep 1, 2026 | ||
| 4 | Aug 19, 2026 | Brightside Ltd | Service | 1850 | Oct 1, 2026 | ||
| 5 | Aug 31, 2026 | Orla Hayes | Product | 395 | |||
| 6 | Sep 2, 2026 | Kemp Studio | Service | 2100 | |||
| 7 | Sep 15, 2026 | Dunmore Farm | Product | 780 | |||
| 8 | Sep 30, 2026 | Orla Hayes | Service | 960 | |||
| 9 | Oct 7, 2026 | Dunmore Farm | Product | 1430 | |||
| 10 | Oct 22, 2026 | Brightside Ltd | Service | 2275 | |||
| 11 | Walk-in | Product | 150 |
Download this sheet as an Excel practice file (.xlsx)
Step 1: a list of months
Use real dates for the months, not text like "Aug". Type the first day of the first month in F2, then add one month at a time with EDATE. Format the cells to show just the month and year, so 8/1/2026 displays as Aug 2026 but stays a date that formulas can compare.
- In F2, type the first day of the first month, for example 8/1/2026 (or 1/8/2026 if your dates are day-first).
- In F3, type
=EDATE(F2,1)and fill it down for as many months as you need. - Select F2:F4, press Ctrl+1, choose Custom and type mmm yyyy.
Step 2: SUMIFS between the 1st and the next 1st
SUMIFS adds the amounts in D whose date is on or after the month start and before the next month's start. EOMONTH(F2,0) is the last day of the month, so adding 1 gives the first day of the next month.
The data ranges are locked with $, and F2 is not. When you fill G2 down to G4, the ranges stay put and F2 becomes F3 and F4, so each row totals its own month. September gives 3,840 and October 3,705.
Result: 2885
2,885 for August 2026: 640 + 1,850 + 395.
Why "<" the next month instead of "<=" the last day
Dates that come from a system export often carry a time, such as 8/31/2026 4:45 PM. That is a little more than 8/31/2026, so a "<="&EOMONTH(F2,0) test leaves it out, and the last afternoon of every month quietly disappears. "Less than the next month's first day" includes the whole last day, whatever the time.
If your month cell can be any day in the month rather than the 1st, start from EOMONTH(F2,-1)+1 instead of F2. That is the first day of the same month.
The MONTH() shortcut and its two traps
You will often see =SUMPRODUCT((MONTH(A2:A11)=9)*D2:D11). It looks simpler, but MONTH only knows the month number. Here it adds the September 2025 sale to September 2026.
The second trap is the walk-in sale in row 11 with no date. An empty cell is day 0 to Excel, and MONTH of 0 is 1, so =SUMPRODUCT((MONTH(A2:A11)=1)*D2:D11) puts that 150 into January. If you use this pattern, always add YEAR: =SUMPRODUCT((YEAR(A2:A11)=2026)*(MONTH(A2:A11)=9)*D2:D11) gives 3,840.
Result: 5040
5,040, which is wrong for September 2026: it includes the 1,200 from September 2025.
Sum by month and category
Add more range and criteria pairs to the same SUMIFS. For a summary grid, put the categories across row 1 and the months down column F, and lock the references so one formula fills the whole grid: the category header with a $ before the row number (G$1), the month with a $ before the column letter ($F2).
A blank date never falls between two real dates, so SUMIFS leaves the undated walk-in sale out of every month. Check for those rows separately: =SUMIFS(D2:D11,A2:A11,"") finds 150 that is in no month.
Result: 3060
3,060 of Service sales in September 2026: 2,100 + 960.
No formulas: a PivotTable grouped by month
For a quick report you will not maintain by hand, a PivotTable is faster. In Excel 2016 and later, dragging a date field into Rows usually groups it automatically. If it does not, group it yourself. Always group by Months and Years together, or every September from every year lands in one row.
If Group is greyed out or says "Cannot group that selection", the date column contains text or blanks. Fix the text dates first, or filter out the blank row.
- Click any cell in the data and choose Insert > PivotTable > OK.
- Drag Date to Rows and Amount to Values.
- If the dates are not grouped, right-click a date in the PivotTable > Group.
- Select Months and Years, then OK.
- When you add new rows, right-click the PivotTable > Refresh. Format the data as a table first (Ctrl+T) so new rows are included.
Common mistakes
Months typed as text, like "Sep"
SUMIFS needs a real date to compare with. Use the 1st of the month and a mmm yyyy format.
Totals that mix years
MONTH() ignores the year. Use date bounds in SUMIFS, or add a YEAR() test.
The last day of the month is missing
The dates carry times. Use "<"&EOMONTH(F2,0)+1 rather than "<="&EOMONTH(F2,0).
Every month shows 0
The dates are text. They sit on the left of the cell and COUNT(A2:A11) does not count them. Convert them with Data > Text to Columns > Finish.
FAQ
How do I sum values by month in Excel?
Put the 1st of each month in a column and use =SUMIFS(amounts,dates,">="&F2,dates,"<"&EOMONTH(F2,0)+1). Fill it down for each month, or use a PivotTable grouped by Months and Years.
Can I use SUMIF by month name?
Not directly, because SUMIF compares the dates themselves. Add a helper column with =TEXT(A2,"yyyy-mm") and use SUMIF on that, or use SUMIFS with date bounds.
How do I sum the current month in Excel?
Use TODAY() for the bounds: =SUMIFS(D:D,A:A,">="&EOMONTH(TODAY(),-1)+1,A:A,"<"&EOMONTH(TODAY(),0)+1).
Why is my PivotTable not grouping dates by month?
At least one cell in the date column is text or empty. Convert the text to real dates or remove the blank rows, then refresh and group again.
Functions used
SUMIFSAdds with several conditionsEOMONTHLast day of a monthEDATESame day, months laterSUMPRODUCTMultiply then addMONTHMonth numberYEARYear of a dateTEXTNumber to formatted textTODAYToday’s date
Related guides
- SUMIFS between two dates in Excel
- How to find the last day of the month in Excel
- How to get the month name from a date in Excel
- SUMIFS with multiple criteria in Excel
- Get the quarter from a date in Excel
- Count cells between two dates in Excel
- How to calculate age in Excel from date of birth
Updated