How to Allocate Contract Fees by Financial Year in Excel
Question details
The user needs to distribute contract fees into the correct financial-year columns, with first-year fees in the start year, remaining fees in later years, and zero or blank after the contract end date.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- A user has a contract table and needs fees to appear in the correct financial-year columns based on each contract start and end date.
- Observed behavior
- Fees appear in the wrong years or continue to calculate after the contract end date.
Set up your contract data as a table named Table1 with one row per contract and columns for Start Date, End Date, First-Year Fee, and Remaining Fee. Put each financial year as a numeric column header, such as 2025, so the formula can compare the header year correctly.
Use a Structured-Reference Formula to Allocate First-Year and Remaining Fees
Best for a clean contract table named Table1 when you want one Excel-compatible formula to drive every financial-year column.
The formula compares the financial-year header with the YEAR of the contract start and end dates. It returns First-Year Fee when the header equals the start year, Remaining Fee when the header falls after the start year through the end year, and blank otherwise.
Select your contract data range, click Insert > Table, check My table has headers, and rename the table to Table1 in the Table Tools tab.
Click the first data cell under the 2025 financial-year header and enter: =IF(C$1=YEAR(Table1[@Start Date]),Table1[@First-Year Fee],IF(AND(C$1>YEAR(Table1[@Start Date]),C$1<=YEAR(Table1[@End Date])),Table1[@Remaining Fee],""))
Press Enter, then use the fill handle to drag the formula across the remaining financial-year columns and down through all contract rows.
Confirm that columns after the contract end year are blank or zero, and that the start year shows First-Year Fee while later years through the end year show Remaining Fee.
Use Helper Columns for Start Year and End Year
Use this when headers are hard to parse or when you want a shorter, easier-to-read formula.
Allocate Contract Fees by Financial Year in WPS Office Spreadsheets
Use WPS Office Spreadsheets to create a contract table, apply an Excel-compatible structured-reference formula, and distribute first-year and remaining fees into the correct financial-year columns without an Office subscription.
- 1. Open WPS Office Spreadsheets: Open WPS Office, create a new workbook, or open your existing .xlsx contract workbook.
- 2. Create a table named Table1: Select your contract range, click Insert > Table, and set the table name to Table1 in the Table Tools tab.
- 3. Enter the allocation formula: In the first financial-year column, type the structured-reference formula that compares the header year with the contract start and end years.
- 4. Fill the formula across and down: Use the fill handle to copy the formula to all contract rows and financial-year columns.
- 5. Review and save: Check the fee allocation and save the file in .xlsx format from WPS Office.

Frequently Asked Questions
Can I use this formula when my financial year does not start in January?
Yes. The formula compares calendar-year headers, so for April-to-March financial years adjust the header parsing or add a helper column that returns the correct financial year from the contract start date.
Why does my formula return #VALUE! when the financial-year headers are text?
A text header such as "2025" may not compare directly with YEAR. Use C$1+0 or VALUE(C$1) in the formula, or format the header cells as numbers.
How do I show blank instead of 0 after the contract end date?
Set the formula's final value to "" as in the recommended formula, or select the range and use a custom number format such as 0;-0;;@ to hide zero values.
Does this work in both WPS Office Spreadsheets and Microsoft Excel?
Yes. The table and structured-reference formula are compatible with .xlsx workbooks in both applications.
What if a contract starts and ends in the same financial year?
The formula returns First-Year Fee for that year and leaves all later financial-year columns blank because there is no remaining fee period.




