Formatting Issues

Change a Row’s Color Based on a Cell Value in Excel for the Web

Ayan MasoodAyan Masood Dec 2, 2026 868 views

Question details

Color an entire row in Excel for the web when a cell in that row matches a specified value.

Change a Row’s Color Based on a Cell Value in Excel for the Web
Product
Excel for the web
Device & OS
not provided
Scenario
A worksheet has a status column, and the user wants to highlight each full data row when its status is Late.
Observed behavior
Rows should automatically receive a fill color when the corresponding status cell meets the condition.
Before you start

Identify the column containing the values to check and the first row of data, excluding any header. The example below uses status values in column A and data in rows 2 through 100.

Solution 1Recommended

Create a formula-based rule for the full row range

Use conditional formatting to highlight columns A through H whenever the status in column A is Late.

1
Select the data range

In Excel for the web, select A2:H100, or select the corresponding full row range in your worksheet.

2
Create a rule

Go to Home > Conditional Formatting > New Rule and choose the option to use a formula.

3
Enter the formula

Enter =$A2="Late". Replace A with your status column and 2 with the first row of your selected range if needed.

4
Choose the fill and apply

Choose a fill color, confirm that the rule applies to $A$2:$H$100 or your selected range, and save or apply the rule.

Create a formula-based rule for the full row range
How the reference works: The dollar sign fixes column A, while the row number changes for each row in the applied range.
Highlight rows in WPS Spreadsheets

Color entire rows with conditional formatting in WPS Spreadsheets

Open your workbook in WPS Spreadsheets and use a formula-based conditional formatting rule to highlight rows based on a status value.

  1. 1. Open your workbook: Open WPS Spreadsheets and select Open to load your Excel workbook.
  2. 2. Select the rows: Select the data range to format, such as A2:H100.
  3. 3. Add a formula rule: Go to Home > Conditional Formatting > New Rule, choose the formula-based rule option, and enter =$A2="Late".
  4. 4. Set the fill: Choose a fill color in the rule’s formatting options, confirm the selected range, and apply the rule.
Highlight a full row when its status cell matches a valueOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet menus and formatting toolsGet started with WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula use $A2 instead of A2?

The dollar sign fixes the status column as column A across the selected range. The row number remains relative, so each row is checked against its own status cell.

How do I check a status in a different column?

Replace A in the formula with the status column. For example, use =$D2="Late" to check column D when the first data row is row 2.

How can I highlight rows with a different status?

In Home > Conditional Formatting, edit the rule and replace "Late" with the text you want to match, such as "Complete".

What if new rows are outside the highlighted range?

Open the conditional formatting rules from the Home tab and extend the rule’s applied range to include the new rows.