How to Use SUMIFS for a Rolling Last 12 Months Total in Spreadsheets
Question details
The user needs an automated formula to calculate the sum for the previous twelve months for a monthly forecast.

- Product
- Spreadsheet
- Device & OS
- not provided
- Scenario
- Creating an automatic monthly financial or sales forecast that updates dynamically based on the current date.
- Observed behavior
- The standard SUMIF formula is failing to return the expected rolling twelve-month totals.
Ensure your dataset includes a row or column formatted as valid dates, as the SUMIFS formula relies on properly recognized date values to calculate the rolling 12-month period.
Use SUMIFS with EDATE and TODAY Functions
Combine the SUMIFS function with EDATE and TODAY() to dynamically calculate sums based on a rolling 12-month window from the current date.
A standard SUMIF can only evaluate one condition, but a rolling 12-month total requires two conditions: the date must be less than or equal to today, and greater than or equal to the date exactly 12 months ago.
By utilizing the EDATE function alongside TODAY(), the spreadsheet can automatically calculate the starting date of your 12-month window without requiring manual updates each month.
Click on the cell where you want the rolling 12-month total to be displayed.
Type the formula: =SUMIFS(Sum_Range, Date_Range, ">="&EDATE(TODAY(),-12), Date_Range, "<="&TODAY()) into the formula bar.
Replace 'Sum_Range' with the actual cells containing the values you want to add up (e.g., Monthly!$3:3) and 'Date_Range' with the cells containing your date headers (e.g., Monthly!9:9).
Press Enter to execute the formula. The cell will now display the automatic total for the past twelve months.

Reference Specific Cells for Custom Rolling Periods
Instead of using the TODAY() function, reference specific cells containing your chosen start and end dates for a customizable rolling total.
Calculate Dynamic Data with WPS Spreadsheet
WPS Spreadsheet fully supports advanced mathematical and logical functions like SUMIFS, EDATE, and TODAY, making financial forecasting and data analysis a breeze.
- 1. Open your dataset: Launch WPS Spreadsheet and open the file containing your financial or forecasting data.
- 2. Access the function library: Click on the 'Formulas' tab in the top ribbon to explore the categorized function library.
- 3. Insert the SUMIFS function: Use the 'Insert Function' tool to search for SUMIFS. A dialog box will appear to help you map your sum ranges and date criteria without typing the syntax manually.
- 4. Calculate and review: Click OK to apply the function. WPS Spreadsheet will instantly calculate your dynamic rolling totals.

Frequently Asked Questions
Why is my SUMIFS formula returning 0 for the 12-month total?
This usually happens if your designated date range contains text strings instead of actual date values, or if the sum range and criteria range are not identically sized. Ensure your dates are properly formatted by right-clicking the cells, selecting 'Format Cells', and choosing 'Date'.
Can I calculate a rolling 6-month total instead of 12 months?
Yes, you can easily modify the EDATE function in your formula. Simply change EDATE(TODAY(), -12) to EDATE(TODAY(), -6) to adjust the dynamic rolling period to the previous six months.
What is the difference between SUMIF and SUMIFS?
SUMIF is designed to evaluate only a single condition (e.g., adding sales for just one specific month). SUMIFS allows you to evaluate multiple conditions simultaneously across different ranges, which is required for a rolling total that needs both a start date and an end date.




