Use Dynamic Month Headers and IFERROR in WPS Office Excel Formulas
Question details
The user needs to modify an Excel formula so it reads month criteria dynamically from headers F6:I6 and returns a custom message when no Area One accounts require deactivation.

- Product
- WPS Office Spreadsheets
- Device & OS
- not provided
- Scenario
- The user maintains a workbook that checks Area One accounts by month and wants to avoid hard-coded month columns such as I:L.
- Observed behavior
- The current formula uses fixed I:L references and does not show a custom message when no Area One accounts require deactivation.
Confirm that the workbook is open in WPS Office Spreadsheets and that the month headers are located in F6:I6. Also verify whether your WPS version supports XMATCH; if not, prepare to use MATCH as a fallback.
Use XMATCH and IFERROR to make the month columns dynamic
Use this solution when the month header in F6:I6 changes and you want WPS Spreadsheets to select the matching data columns automatically while also returning a friendly message when no Area One accounts match.
XMATCH converts the selected month header into a relative column position, so the formula no longer depends on the fixed I:L range. IFERROR catches the result when no Area One accounts require deactivation and displays your custom message instead of an error.
Click the cell that contains or will contain the Area One formula, then click inside the formula bar in WPS Office Spreadsheets.
Type =IFERROR( before your existing formula and add ,"No Area One accounts require deactivation.") at the end, replacing the message text if needed.
Replace the hard-coded I:L range with INDEX($I:$L,0,XMATCH(selected_month,$F$6:$I$6)), where selected_month is the header cell used as the month criterion.
Press Enter, then change the selected month header and verify that the formula recalculates using the matching month column and shows the custom message when no accounts match.

Use IFERROR with a static range as a quick fallback
Use this if you only need the custom message immediately and do not need dynamic month headers yet.
Make Excel Month Formulas Dynamic in WPS Spreadsheets
Use WPS Office Spreadsheets to replace hard-coded month columns with XMATCH and wrap the formula in IFERROR, so your Area One workbook updates from the F6:I6 headers and shows a custom message when no accounts require deactivation.
- 1. Open the workbook in WPS Spreadsheets: Launch WPS Office, click Menu > Open, and select the Excel workbook that contains the Area One formula.
- 2. Click the formula cell and open the formula bar: Select the cell that shows the formula result and click in the formula bar above the worksheet grid.
- 3. Add dynamic month matching with XMATCH: Edit the formula to use XMATCH against the headers in F6:I6 and INDEX over the data columns instead of the fixed I:L range.
- 4. Wrap the formula with IFERROR: Use =IFERROR(your_formula,"No Area One accounts require deactivation.") to display the custom message when no matching Area One accounts exist.
- 5. Save and test the result: Press Enter, change the month header selection, and save the workbook to confirm the formula recalculates correctly.

Frequently Asked Questions
How do I make an Excel formula use dynamic month headers in WPS Spreadsheets?
Use XMATCH with the month header range such as $F$6:$I$6 to return the position of the selected month, then feed that position into INDEX or another selection function instead of hard-coding I:L.
Which function can show a custom message when no Area One accounts require deactivation?
Wrap the calculation in IFERROR, for example =IFERROR(your_formula,"No Area One accounts require deactivation."). When the inner formula returns an error, WPS displays the second argument.
Does WPS Office support XMATCH in Excel files?
Yes, WPS Office Spreadsheets supports XMATCH in current versions when editing .xlsx files. If XMATCH is not available in your version, use MATCH with the same header range as a fallback.
How do I replace hard-coded columns I:L with a dynamic month reference?
Use INDEX($I:$L,0,XMATCH(selected_month,$F$6:$I$6)) as the column selector so the formula moves to the matching month position instead of always reading fixed columns I:L.
Why does my formula still show #N/A instead of the custom message?
Make sure the IFERROR wrapper encloses the complete original formula and that the selected month header exactly matches a value in F6:I6. Also check that the data range in INDEX matches the columns your formula expects.




