How to Fix Excel Conditional Formatting and Custom Formatting Failures
Question details
The user needs to fix issues where Excel conditional formatting rules fail to apply due to formula errors, and custom number formatting does not work on dates.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Setting up conditional formatting based on MATCH lookup formulas and applying custom numeric formats to dates.
- Observed behavior
- Formulas return #N/A errors preventing conditional formatting from working correctly, and custom date formatting ignores cells where dates are stored as text or left blank.
Before troubleshooting, verify that your cells do not contain hidden spaces and ensure your formulas are not incorrectly enclosed in quotation marks, which turns them into text strings.
Handle Lookup Errors Using the IFERROR Function
Use this solution to prevent #N/A errors in your MATCH formulas, allowing conditional formatting to apply successfully when a value is found.
When using a lookup function like MATCH inside conditional formatting, it will return an #N/A error if the value is not found. Conditional formatting cannot process this error natively. Wrapping your formula in IFERROR allows you to output a clean value or a blank cell.
Place your lookup value in a designated cell, such as C4.
In your target cell or formatting rule, use the formula: =IFERROR(IF(MATCH(C4,$A$4:$A$17,0),"Home",""),"") to return the word 'Home' when matched, or a blank if it fails.
Select the range you want to format, navigate to Home > Conditional Formatting > Highlight Cells Rules > Text that Contains, and enter 'Home' to apply your desired format.

Convert Text Dates to Numeric Values for Custom Formatting
Use this method when custom date and number formatting does not change the appearance of your data.
Easily Fix Formatting and Formula Issues in WPS Spreadsheet
WPS Spreadsheet provides robust conditional formatting tools and seamless text-to-number conversion, making it incredibly simple to manage complex formulas and custom date formats without errors.
- 1. Open your file in WPS Spreadsheet: Launch WPS Office and open your spreadsheet document containing the failed formatting.
- 2. Apply IFERROR rules: Select your cells, navigate to the Home tab, click 'Conditional Formatting', and input your IFERROR/MATCH formula directly.
- 3. Convert text to dates instantly: Highlight any text-based dates, click the error indicator exclamation mark next to the cell, and choose 'Convert to Number'.

Frequently Asked Questions
Why does my MATCH formula return an #N/A error in Excel?
The #N/A error occurs when the MATCH function cannot find the lookup value in your specified data range. You can prevent this by wrapping your entire formula in the IFERROR function to output a blank cell or alternative text instead.
Why is my conditional formatting ignoring my custom date format?
Custom formatting only alters the visual appearance of numeric values. If your dates are stored as text strings, the custom number format will be ignored. You must convert the text to numeric values first using the Text to Columns feature.
Can I apply number formatting to a blank cell?
No, number formatting only applies to cells that contain actual numeric data. Blank cells and cells containing only text will not reflect the applied number or date format until valid data is entered.
How do I remove quotation marks from my formulas easily?
If your formula is wrapped in quotes, Excel treats it as plain text instead of calculating it. Simply click into the formula bar, delete the leading and trailing quotation marks, and press Enter to activate the formula.




