How to Color Cells Automatically When Entering X or O in WPS Office Excel
Question details
The user wants to apply conditional formatting in WPS Office Excel so cells change fill color automatically when the value X or O is entered.

- Product
- WPS Office Spreadsheets (Excel)
- Device & OS
- not provided
- Scenario
- You are tracking a scorecard, grid, or game board and want cells that contain X or O to be highlighted automatically.
- Observed behavior
- Cells containing X or O automatically fill with the selected color after the conditional formatting rule is applied.
Make sure the active cell reference in your formula matches the first cell of the selected range; otherwise the rule can color the wrong cells.
Use a Conditional Formatting Formula to Color X or O Cells Automatically
Use this solution when you want WPS Office Excel to automatically change cell fill color as soon as X or O is entered in the selected range.
This formula-based rule evaluates each cell relative to the first cell in the selection and fills it when the value is x or o.
Open your workbook in WPS Office Excel and select the cells where X or O should trigger a color change.
Go to the Home tab, click Conditional Formatting, and choose New Rule.
Select Use a formula to determine which cells to format, then enter =OR(A1="x",A1="o") and replace A1 with the first cell in your selected range.
Click Format, open the Fill tab, choose the desired color, and click OK. Click OK again to apply the rule.

Color X and O Cells Automatically with WPS Office Conditional Formatting
WPS Office Excel lets you create a formula-based conditional formatting rule that automatically highlights cells when they contain X or O, keeping XLSX and XLS workbooks compatible.
- 1. Open WPS Office Excel: Launch WPS Office and open the workbook or spreadsheet where you want color-changing cells.
- 2. Create the rule: Select the range, click Home > Conditional Formatting > New Rule, and choose Use a formula to determine which cells to format.
- 3. Enter the formula and color: Enter =OR(A1="x",A1="o"), click Format to select a fill color, then click OK to apply.

Frequently Asked Questions
Will the conditional formatting work if I type uppercase X or O?
The example formula =OR(A1="x",A1="o") is not case-sensitive for simple letters, but if you need strict matching, use =OR(EXACT(A1,"x"),EXACT(A1,"o")).
Can I use two different colors for X and O?
Yes. Create two rules: one with formula =A1="x" and another with =A1="o", then choose a different fill color for each rule.
How do I apply this rule to an entire column or row?
Select the whole column or row first, and use the first cell reference in the formula, such as =OR(A1="x",A1="o") for column A.
Does the color update automatically when X or O is entered?
Yes. Conditional formatting evaluations update automatically whenever a cell value changes to X or O within the applied range.




