How to Create a Spilled Excel Formula for Revenue by Quarter or Year
Question details
The user needs to allocate project revenue across its duration and dynamically summarize the results by year and quarter using modern array formulas.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Financial modeling or project management where a total project revenue needs to be distributed over its active timeline and summarized into quarterly and annual reports.
- Observed behavior
- Requires a modern, dynamic array-based approach (a spilled formula) to automate the distribution and summation, replacing traditional manual formulas or static pivot tables.
Ensure your version of Excel supports modern dynamic array functions such as LET, SEQUENCE, and PIVOTBY, which are typically available in recent Microsoft 365 updates.
Use Dynamic Array Functions (LET and PIVOTBY)
Create a single spilled formula that calculates the dates, distributes the revenue, and generates a summary matrix by quarter and year.
This approach uses the LET function to define variables for dates and intermediate calculations, keeping the formula clean. The PIVOTBY function is then used to summarize the generated data into a single spilled array.
Use the SEQUENCE function combined with EDATE to generate a list of dates spanning the entire project duration based on your start and end dates.
Extract the year using the YEAR function. For the quarter, define a variable within LET using the formula QUOTIENT(MONTH(Date)-1, 3)+1 to map each month to its respective quarter.
Divide the total project revenue evenly across the generated months by dividing the total revenue by the count of items in your sequence.
Wrap your variables in PIVOTBY(HSTACK(Year, Quarter), Project, Revenue, SUM, 0). This will group the rows by Year and Quarter, place Projects in columns, and sum the allocated revenue.

Summarize Revenue Using Power Query
If dynamic arrays like PIVOTBY are not available, Power Query offers a robust and straightforward alternative for transforming and summarizing project revenue over time.
Manage and Analyze Project Revenue in WPS Spreadsheet
WPS Office provides robust spreadsheet capabilities, including dynamic array functions, standard pivot tables, and advanced data modeling tools to easily calculate and allocate revenue by year and quarter.
- 1. Open your data in WPS Spreadsheet: Launch WPS Office and open your project revenue workbook.
- 2. Apply dynamic arrays: Use functions like SEQUENCE, EDATE, and LET to distribute revenue across dates seamlessly in your data range.
- 3. Create a PivotTable summary: Select your calculated dataset, go to the Insert tab, and choose PivotTable to aggregate the revenue.
- 4. Group by Year and Quarter: Drag your Date field to the Rows area, right-click any date in the PivotTable, and select Group to instantly organize your data by Quarters and Years.

Frequently Asked Questions
What is a spilled formula in Excel?
A spilled formula is a dynamic array formula that returns multiple values, automatically spilling the results into adjacent empty cells without needing to manually copy the formula down rows or across columns.
Why isn't the PIVOTBY function working in my Excel?
PIVOTBY is a newer dynamic array function that may only be available to Microsoft 365 subscribers on certain update channels. If you have an older standalone version (like Office 2019 or 2021), the function will return a #NAME? error.
Can I use Power Query instead of spilled formulas for revenue allocation?
Yes, Power Query is highly recommended for allocating and summarizing data over time. You can generate custom date lists, expand rows, and divide the revenue before loading it into a PivotTable, which is often easier to troubleshoot than a massive nested formula.
How do I calculate the quarter from a date in an Excel formula?
You can calculate the quarter mathematically by using the formula =QUOTIENT(MONTH(Date)-1, 3)+1 or by using =ROUNDUP(MONTH(Date)/3, 0). Both formulas effectively map months 1-12 to quarters 1-4.




