Formatting Issues

Stop Excel Conditional Formatting When Another Cell Contains Text

Algirdas JasaitisAlgirdas Jasaitis Dec 2, 2026 868 views

Question details

The user wants a date-based conditional formatting rule to stop applying when a related cell contains text.

Stop Excel Conditional Formatting When Another Cell Contains Text
Product
Microsoft Excel
Device & OS
not provided
Scenario
Apply formatting when a date is 10 to 13 days old and a related cell is empty.
Observed behavior
The existing date-based rule needs an additional condition to check the related cell.
Before you start

Identify the date column, the related cell or range to check, and the first row of the range receiving formatting. The examples below use dates in column G and start on row 2.

Solution 1Recommended

Add a blank-cell check to the Excel formatting rule

Use this method when formatting should apply only if the date is 10 to 13 days old and the related cell is empty.

1
Open the rule

Select the cells with the formatting, then choose Home > Conditional Formatting > Manage Rules. Select the existing date rule and click Edit Rule.

2
Update the formula

In the formula field, enter =AND(ISNUMBER($G2),TODAY()-$G2>=10,TODAY()-$G2<=13,$H2=""). This checks the date in G2 and requires H2 to be empty.

3
Check the applied range

Confirm the Applies to range starts on the row used in the formula. For example, use row 2 references for a range starting at G2; keep the row numbers relative so Excel checks each row.

4
Save and test

Click OK, then Apply. Enter text in H2 and confirm that the formatting disappears from the corresponding row.

Add a blank-cell check to the Excel formatting rule
How the blank check works: H2="" also treats a formula returning an empty string as empty. A space or a number in H2 prevents the formatting.
WPS Spreadsheets

Apply the same conditional formatting rule in WPS Spreadsheets

Use a formula-based conditional formatting rule in WPS Spreadsheets to highlight dates only when the related cell is empty.

  1. 1. Open your workbook: Open the Excel workbook in WPS Spreadsheets and select the cells you want to format.
  2. 2. Create a rule: Choose Home > Conditional Formatting > New Rule, then select the option to use a formula to determine which cells to format.
  3. 3. Enter the formula: Enter =AND(ISNUMBER($G2),TODAY()-$G2>=10,TODAY()-$G2<=13,$H2=""), adjusting the columns and first row to match your selection.
  4. 4. Choose the format: Click Format, choose the desired appearance, and confirm the rule. Enter text in the related cell to test that the formatting stops.
Combine date and blank-cell checks in one formatting rule.Open and edit Microsoft Excel XLSX and XLS files.Use a familiar spreadsheet interface to manage formatting rules.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula use $G2 instead of G2?

The dollar sign locks the date column while leaving the row relative. This lets a rule applied across multiple columns continue to check column G for each row.

Will a formula returning an empty string count as blank?

The check H2="" treats a formula returning "" as empty. COUNTA(H2) does not, because it counts cells containing formulas.

How can I stop formatting if any related cell contains a number or text?

Use COUNTA($H2:$K2)=0 in the AND formula to require the range to be truly empty. This also counts formulas that return an empty string.

Why is the formatting checking the wrong row?

Open Home > Conditional Formatting > Manage Rules and compare the formula's row number with the first row in Applies to. A range starting on row 5 should use references such as $G5 and $H5.