Formatting Issues

Match a Cell's Fill Color with Conditional Formatting in Excel

Steven ParkerSteven Parker Dec 2, 2026 869 views

Question details

Make one cell display the same conditional-formatting color as another cell based on text values.

Match a Cell's Fill Color with Conditional Formatting in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user wants B2 to match the conditional-formatting color of E2 when E2 contains a value such as STS or SS.
Observed behavior
B2 should display red when E2 contains STS and yellow when E2 contains SS, using the same conditions as E2.
Before you start

Check the source cell's conditional formatting rules and note the text values and fill colors they use. The example below assumes E2 is the source cell and B2 is the target.

Solution 1Recommended

Apply the Source Cell's Formatting Logic to the Target Cell

Use formula-based rules to give B2 the same fill color as E2 for each specified text value.

Conditional formatting formulas cannot directly read another cell's displayed fill color. Instead, recreate the conditions that determine that color.

1
Select the target cell

Click B2, then go to Home > Conditional Formatting > New Rule.

2
Create the STS rule

Choose Use a formula to determine which cells to format and enter =$E$2="STS". Click Format, open the Fill tab, select red, and click OK twice.

3
Create the SS rule

With B2 selected, open Home > Conditional Formatting > New Rule again. Use the formula =$E$2="SS", choose a yellow fill under Format > Fill, and click OK twice.

4
Add remaining conditions

Repeat Home > Conditional Formatting > New Rule for each additional value, using the same formula pattern and fill color as the source cell's rule.

Apply the Source Cell's Formatting Logic to the Target Cell
Formatting multiple rows: To format B2:B10 based on the corresponding cells in column E, select B2:B10 and use formulas such as =$E2="STS". The row reference can then adjust for each row.
WPS Spreadsheets

Match Conditional Formatting Colors in WPS Spreadsheets

Use formula-based conditional formatting in WPS Spreadsheets to apply the same text-driven fill colors to another cell.

  1. 1. Open the workbook: Open your spreadsheet in WPS Spreadsheets and select the target cell, such as B2.
  2. 2. Add a formula rule: Go to Home > Conditional Formatting > New Rule and choose the option to use a formula to determine which cells to format.
  3. 3. Set the first color: Enter =$E$2="STS", choose a red fill in the formatting options, and confirm the rule.
  4. 4. Add the other conditions: Create another rule with =$E$2="SS" and a yellow fill. Repeat for any other values and colors used by the source cell.
Match fill colors using the same conditions as the source cellCreate separate color rules for values such as STS and SSOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Can Excel conditional formatting read another cell's fill color directly?

No. A conditional formatting formula cannot directly read another cell's displayed fill color. Instead, create a rule on the target cell using the same condition that sets the source cell's color.

How do I match colors for each row in a range?

Select the target range, such as B2:B10, and create a formula rule such as =$E2="STS". The fixed column and relative row make each cell in column B refer to the corresponding row in column E.

What if the source cell has more than two color conditions?

Select the target cell and add a separate rule under Home > Conditional Formatting > New Rule for each value, matching the fill color used by the source cell's rule.

Will the target cell match a manually applied fill color?

Not with these formulas. They evaluate text values rather than read fill colors, so they will not automatically match a manually applied color unless a corresponding rule produces it.