Formatting Issues

Color Excel Rows Based on Column G with Conditional Formatting

Adam DavisAdam Davis Nov 25, 2026 870 views

Question details

The user wants to color entire Excel rows according to the status in column G.

Color Excel Rows Based on Column G with Conditional Formatting
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet has statuses such as Tender, Won, Lost, and Sent in column G, and each status should have its own row color.
Observed behavior
Rows should display the assigned fill color based on their column G value, including a separate color for blank cells if needed.
Before you start

Identify the first data row and the full range of columns you want to color. The examples below assume data starts in row 2 and the range to format is A2:G100.

Solution 1Recommended

Create a conditional formatting rule for each status

Use formula-based rules to apply a different fill color to each row according to column G.

The dollar sign locks the reference to column G, while the row number changes for each row in the selected range. No IF formula is needed.

1
Select the data range

Select A2:G100, starting with A2 as the active cell. Extend the selection to other columns if you want those cells colored too.

2
Create the first rule

Go to Home > Conditional Formatting > New Rule. Choose Use a formula to determine which cells to format, then enter =$G2="Tender".

3
Choose a fill color

Click Format, open the Fill tab, choose a color, and click OK. Click OK again to create the rule.

4
Add the remaining rules

Repeat Home > Conditional Formatting > New Rule for =$G2="Won", =$G2="Lost", and =$G2="Sent", choosing a different fill color for each. For blank column G cells, add a rule using =$G2="".

5
Check the rule range

Open Home > Conditional Formatting > Manage Rules and confirm that each rule applies to =$A$2:$G$100, or to your intended range.

Create a conditional formatting rule for each status
Match the first row: If your selected range starts on a different row, replace 2 in every formula with that row number. The blank rule also matches cells whose formulas return an empty string.
Format rows in WPS Spreadsheets

Color rows by status in WPS Spreadsheets

Use formula-based conditional formatting in WPS Spreadsheets to give each column G status its own row color.

  1. 1. Open the worksheet: Open your workbook in WPS Spreadsheets and select the data range, such as A2:G100.
  2. 2. Create a formula rule: On the Home tab, open Conditional Formatting and choose New Rule. Select the option to use a formula, then enter =$G2="Tender".
  3. 3. Set the row color: Open the format settings, choose a fill color, and confirm the rule.
  4. 4. Add other statuses: Create separate rules for =$G2="Won", =$G2="Lost", and =$G2="Sent". Add =$G2="" if blank statuses also need a color.
  5. 5. Review and save: Use Conditional Formatting > Manage Rules to check the applied range, then choose File > Save.
Color entire rows according to the status in column GOpen and edit Microsoft Excel XLSX filesUse a familiar spreadsheet interfaceGet started with WPS Office for free
microsoft office alternative - wps office

Frequently Asked Questions

Why does the formula use $G2 instead of G2?

The dollar sign keeps the rule pointed at column G across the selected range. The row number remains relative, so each row is checked against its own column G cell.

How do I color columns beyond G?

Select the full range you want to color, such as A2:K100, before creating the rules. Alternatively, update the Applies to range under Home > Conditional Formatting > Manage Rules.

How can I highlight rows with a blank status?

Create a formula-based rule using =$G2="" if your selected range starts on row 2. This also matches cells with formulas that return an empty string.

Why are the wrong rows being colored?

Check that the row number in each formula matches the first row of the Applies to range. For example, a range starting at A5 should use a formula such as =$G5="Won".