Function Problems

How to Change an Excel Cell's Font Color Based on Another Cell

Maira MehtabMaira Mehtab Oct 23, 2026 869 views

Question details

The user wants to automatically change the text color in a target cell (e.g., A10) whenever the text in a reference cell (e.g., A1) is formatted with a specific color like red.

How to Change an Excel Cell's Font Color Based on Another Cell
Product
Excel
Device & OS
not provided
Scenario
Automating spreadsheet formatting so that dependent cells visually update their font color based on the status or formatting of another reference cell.
Observed behavior
Standard Excel functions cannot directly test or detect a cell's font color. Directly triggering a formatting change based purely on the manual color formatting of another cell requires VBA, though formula-based Conditional Formatting offers a more robust workaround.
Before you start

Determine why the original cell is colored red. If it was colored manually, you will need a VBA macro; if it is colored dynamically based on its data value, you can easily use Conditional Formatting for the target cell.

Solution 1Recommended

Use Conditional Formatting Based on Cell Values

Since Excel cannot natively read font colors using standard formulas, the best practice is to apply a Conditional Formatting rule to the target cell based on the underlying value of the reference cell.

This method avoids complex coding by using the actual data driving the color change. For example, if cell A1 turns red because its value is greater than 100, you can set cell A10 to turn red using that exact same mathematical condition.

1
Select the target cell

Click on the cell or range of cells you want to change the font color of (e.g., cell A10).

2
Open Conditional Formatting

Navigate to the Home tab on the Excel ribbon, click the 'Conditional Formatting' button, and choose 'New Rule' from the dropdown menu.

3
Select the formula option

In the New Formatting Rule dialog box, click on 'Use a formula to determine which cells to format'.

4
Enter the logical formula

In the formula bar, type the condition that checks the value of the reference cell. For example, type '=A1>100' or '=A1="Error"'.

5
Apply the custom font color

Click the 'Format' button, go to the 'Font' tab, select the color red from the color palette, and click 'OK' twice to apply the formatting rule.

Use Conditional Formatting Based on Cell Values
Rule Application: Whenever the value in A1 meets your specified condition, the font color in A10 will automatically turn red, mimicking the visual change of the source cell.
Efficient Spreadsheet Formatting

Easily Manage Conditional Formatting with WPS Spreadsheet

WPS Office provides a highly compatible, user-friendly Spreadsheet application that fully supports advanced conditional formatting and VBA macros. Easily format your cells based on complex logical criteria just like in Microsoft Excel.

  1. 1. Open your spreadsheet in WPS Office: Launch WPS Office and open your .xlsx file in the WPS Spreadsheet application.
  2. 2. Access Conditional Formatting: Navigate to the Home tab and click on the Conditional Formatting icon located in the main toolbar.
  3. 3. Set up a new rule: Select 'New Rule', choose the formula option, input your logical condition linking the cells, and customize your desired text color.
Fully compatible with Microsoft Excel (.xlsx) file formats and formulas.Intuitive Conditional Formatting menu for quick rule creation.Robust support for VBA/Macros to automate complex formatting tasks.Free, lightweight, and fast-loading across Windows, Mac, and mobile devices.
microsoft office alternative - wps office

Frequently Asked Questions

Is there an Excel function that returns a cell's font color?

No, standard Excel functions do not extract or read cell formatting properties like font color or background color. You must use VBA macros or legacy Excel 4.0 macro functions to retrieve color index values.

Why isn't my conditional formatting rule updating automatically?

If your conditional formatting is based on a formula, ensure your calculation options are set to 'Automatic' in the Formulas tab. If you used VBA to match colors, remember that changing a font color manually does not trigger a standard worksheet recalculation.

Can I copy my new conditional formatting rule to other cells?

Yes. You can use the Format Painter tool on the Home tab to quickly copy a conditional formatting rule from your target cell and apply it to a larger range of cells.