Excel Error Codes

How to Fix INDEX MATCH #N/A Errors for 36- or 60-Month Returns

Rana GarciaRana Garcia Nov 10, 2026 869 views

Question details

The user needs to troubleshoot an INDEX and MATCH formula returning an #N/A error when calculating 36- or 60-month percentage returns.

Fixing INDEX MATCH #N/A Errors for 36- or 60-Month Returns
Product
Excel
Device & OS
not provided
Scenario
Calculating long-term percentage returns based on historical data where certain month-end dates might be missing.
Observed behavior
The formula evaluates to #N/A because the MATCH function cannot find the exact target date generated by the EOMONTH function within the data array.
Before you start

Verify that your dataset contains continuous, unbroken date records that cover the entire 36- or 60-month historical period you are calculating, and ensure all dates are formatted as Date values rather than text.

Solution 1Recommended

Use IFERROR to Handle Missing Dates Gracefully

Wrap your INDEX MATCH formula in an IFERROR function to replace the #N/A error with a custom text message when exact month-end dates are missing.

The #N/A error appears because the MATCH function is set to exact match (0) but cannot find the precise date calculated by EOMONTH(..., -60). Using IFERROR prevents the error from breaking other dependent calculations.

1
Select the error cell

Click on the cell that currently displays the #N/A error to make it active.

2
Edit the formula

Click into the Formula Bar at the top of the workspace. Type =IFERROR( immediately after the equals sign.

3
Add the fallback message

Move your cursor to the very end of the existing formula, type ,"Insufficient data") and press Enter.

Use IFERROR to Handle Missing Dates Gracefully
Cleaner Spreadsheets: Your cell will now display 'Insufficient data' instead of #N/A, making your financial reports look much more professional.
Advanced Spreadsheet Tools

Calculate Investment Returns Seamlessly with WPS Spreadsheet

WPS Spreadsheet provides powerful formula auditing tools and full compatibility with Excel functions like INDEX, MATCH, and EOMONTH, helping you calculate complex financial returns and troubleshoot errors without the hassle.

  1. 1. Open your data in WPS Spreadsheet: Launch WPS Office and open your financial dataset containing the dates and return values.
  2. 2. Input the calculation: Select the target cell and enter your INDEX MATCH formula. WPS's auto-complete will guide you through the syntax.
  3. 3. Use Error Checking: If you encounter an #N/A error, navigate to the Formulas tab and click 'Error Checking' to diagnose the missing date reference.
  4. 4. Apply IFERROR: Use the formula bar to wrap your calculation in an IFERROR function, ensuring a clean and professional financial report.
100% compatible with Microsoft Excel formulas, functions, and formats (.xlsx).Built-in error checking and formula evaluation tools to easily trace #N/A issues.Lightweight application that handles large financial datasets and array formulas smoothly.Free to use for your daily spreadsheet calculations and financial modeling.
microsoft office alternative - wps office

Frequently Asked Questions

Why does MATCH return #N/A even when the date looks identical in the cell?

Dates in spreadsheets are stored as serial numbers. If one date includes a hidden timestamp (e.g., 12:00 PM) and the calculated EOMONTH date does not, they are not exact matches. Ensure both are formatted purely as dates without time values.

What does the 0 mean in the MATCH function?

The 0 is the match_type argument specifying an 'Exact Match'. It tells the MATCH function to look for the precise lookup value. If it cannot find it, it returns an #N/A error.

How does the EOMONTH function work in return calculations?

EOMONTH(start_date, months) calculates the last day of the month that is a specified number of months before or after a start date. In EOMONTH($N1, -60), it calculates the month-end date exactly 5 years (60 months) prior to the date in cell N1.

Can I use XLOOKUP instead of INDEX MATCH to avoid this error?

Yes, if your software version supports it. XLOOKUP has built-in error handling (the 'if_not_found' argument) and simplified approximate match modes (e.g., match mode -1 to find the next smaller item), which often eliminates the need for combining IFERROR, INDEX, and MATCH.