How to Calculate Milestone Payments Within a Specific Month in Excel
Question details
The user needs a flexible Excel formula to identify equipment milestones that occur within a specific month and calculate the payment by multiplying the applicable percentage by the total equipment cost.
- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking project equipment milestones and automating monthly financial calculations based on changing dates.
- Observed behavior
- The user wants the spreadsheet to automatically find milestones falling within the month indicated in row 19, returning the correct payment percentage multiplied by the equipment cost.
Ensure your milestone dates are formatted as valid Excel date values, and verify that your payment percentages and equipment costs are in the correct reference columns before applying the array formula.
Use XLOOKUP and EOMONTH to Calculate Milestone Payments
This formula checks if a milestone date falls within the target month and retrieves the corresponding payment percentage to multiply by the equipment cost.
This approach uses the EOMONTH function to define the end of the target month and an XLOOKUP array formula with multiple criteria to find the exact milestone match within a specified date range.
Click on the cell where you want the first calculation to appear in your summary table (for example, C20).
Type the formula =IFERROR(XLOOKUP(1,(($C4:$K4>C$19)*($C4:$K4<=EOMONTH(C$19,0))),$D4:$L4)*$A20,"") into the formula bar.
Press Enter to apply the formula, then drag the fill handle down and across to copy the formula for all applicable equipment rows and monthly columns.
Calculate Milestone Payments Effortlessly with WPS Spreadsheet
WPS Spreadsheet fully supports advanced array formulas, including XLOOKUP and EOMONTH, allowing you to easily track project milestones and financial metrics with high precision without any compatibility issues.
- 1. Open your Workbook in WPS: Launch WPS Office and open your existing project tracker spreadsheet.
- 2. Input the Milestone Formula: Navigate to the first monthly calculation cell (e.g., C20) and paste the exact formula: =IFERROR(XLOOKUP(1,(($C4:$K4>C$19)*($C4:$K4<=EOMONTH(C$19,0))),$D4:$L4)*$A20,"").
- 3. Drag and Fill: Click the small square at the bottom right corner of the active cell and drag it across and down to instantly calculate all remaining milestones.

Frequently Asked Questions
Why is the formula returning a blank result instead of a number?
The IFERROR function at the beginning of the formula is set to return a blank ("") if an error occurs. This usually happens if no milestone date falls within the target month, or if the referenced milestone dates are stored as text rather than valid Excel date formats.
Can I use VLOOKUP instead of XLOOKUP for this calculation?
In this specific scenario, XLOOKUP is highly recommended because it allows you to evaluate multiple conditions simultaneously (such as a date being greater than the start of the month and less than the end of the month) using arrays. This level of logical testing is difficult to achieve cleanly with a standard VLOOKUP.
What does the EOMONTH function do in this formula?
The EOMONTH(C$19,0) function calculates the last day of the month specified in cell C19. By using '0' as the second argument, it stays in the current month. This ensures the formula accurately captures any milestone dates occurring between the start and the very end of that specific month.




