logo
search
Formatting Issues

How to Apply Excel Conditional Formatting to an Entire Row Range

Maira MehtabMaira Mehtab Sep 21, 2026 868 views

Question details

The user wants to apply a conditional formatting rule across a specific row range (A1:D1) to change the background color when a specific value is entered in one of the cells (D1).

Product
Excel
Device & OS
not provided
Scenario
Highlighting an entire row or specific row range based on a value entered in a single target column.
Observed behavior
The standard relative formula (=D1="X") only applies the formatting to the first cell (A1) in the selected range, leaving the rest of the row range unformatted.
Before you start

Identify the exact range of cells you want to format and note the specific column containing the trigger value before creating your rule.

Solution 1Recommended

Use an Absolute Column Reference in the Formula

Lock the column reference using a dollar sign ($) so the formatting rule checks the correct cell for every column in the entire row range.

When applying a formula-based conditional formatting rule to a range, Excel uses relative referencing by default. This means if you write =D1="X" for the range A1:D1, cell A1 looks at D1, but cell B1 looks at E1, C1 looks at F1, and so on. To fix this, you must lock the column reference.

1
Select the target range

Highlight the entire range of cells you want to format, such as A1:D1.

2
Open Conditional Formatting

Navigate to the Home tab, click on Conditional Formatting, and select New Rule.

3
Choose the formula option

In the dialog box, select 'Use a formula to determine which cells to format'.

4
Enter the locked formula

Type the formula =$D1="X". Ensure you place the dollar sign ($) before the column letter D.

5
Apply formatting

Click the Format button, choose your desired fill color (e.g., blue), and click OK to apply the rule.

Applying to Multiple Rows: If you apply this rule to a larger range like A1:D10, the formula =$D1="X" will perfectly highlight each respective row based on column D, because the row number (1) is left relative and will adjust for each row automatically.
WPS Spreadsheet Solution

Highlight Entire Rows Automatically in WPS Spreadsheet

WPS Spreadsheet provides a highly intuitive Conditional Formatting engine that flawlessly handles both absolute and relative referencing, making it simple to highlight entire data ranges based on a single cell's value.

  1. 1. Select your data: Open your worksheet in WPS Spreadsheet and highlight the row range you want to color (e.g., A1:D1).
  2. 2. Access Conditional Formatting: Go to the Home tab on the top ribbon and click Conditional Formatting > New Rule.
  3. 3. Set the formula: Choose 'Use a formula to determine which cells to format' and enter =$D1="X".
  4. 4. Format and apply: Click the Format button, select your preferred background color, and click OK.
Fully compatible with Microsoft Excel conditional formatting rules and formulas.Clear, user-friendly interface for managing and troubleshooting multiple formatting rules.Lightweight software that processes complex conditional formatting smoothly without lagging.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my conditional formatting formula only highlight the first cell?

When you use a relative reference like =D1="X" across a range (A1:D1), Excel shifts the reference for each cell. Cell A1 checks D1, but cell B1 checks E1, and C1 checks F1. By locking the column with a dollar sign (=$D1="X"), you force every cell in the row to check column D.

How do I highlight a row if a cell contains specific text rather than an exact match?

You can use the SEARCH function inside your conditional formatting formula. For example, to highlight rows where column D contains the word 'Pending' anywhere in the cell, use the formula =ISNUMBER(SEARCH("Pending",$D1)).

How can I edit a conditional formatting rule I already created?

Select the cells containing the rule, go to the Home tab, click Conditional Formatting, and select 'Manage Rules'. Select your rule from the list and click 'Edit Rule' to modify the formula or the applied format.