Display Yes or No and Color Positive and Negative Values in Excel
Question details
Display Yes for positive numbers and No for negative numbers, with green and red formatting respectively.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet contains numeric values that need to be presented as Yes or No and highlighted by sign.
- Observed behavior
- The desired display is green Yes for positive values, red No for negative values, and a blank display for zero.
Check that the source cells contain numeric values rather than numbers stored as text. Decide whether to keep the Yes or No display in the original cells or use a separate column.
Use a custom number format and conditional formatting
Use this method to display Yes or No in the original cells while keeping their numeric values.
Select the range containing the positive and negative numbers.
Press Ctrl+1, open the Number tab, select Custom, and enter [>0]"Yes";[<0]"No";"" in the Type box. Click OK.
With the range still selected, go to Home > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter 0 and choose a green format.
Go to Home > Conditional Formatting > Highlight Cells Rules > Less Than. Enter 0 and choose a red format.

Create a separate Yes or No display column
Use a formula when you want the labels in a different column from the source numbers.
Show and Color Yes or No in WPS Spreadsheet
Use a custom number format and conditional formatting in WPS Spreadsheet to show Yes or No without replacing the source numbers.
- 1. Open the worksheet: Open your Excel file in WPS Spreadsheet and select the numeric cells.
- 2. Apply the display format: Right-click the selection, choose Format Cells, and select Number > Custom. Enter [>0]"Yes";[<0]"No";"" and confirm.
- 3. Add the positive-value rule: Choose Home > Conditional Formatting > Highlight Cells Rules > Greater Than, enter 0, and select a green format.
- 4. Add the negative-value rule: Choose Home > Conditional Formatting > Highlight Cells Rules > Less Than, enter 0, and select a red format.

Frequently Asked Questions
Does conditional formatting replace the numeric value with Yes or No?
No. Conditional formatting changes appearance only. Use Format Cells > Number > Custom to change the displayed label while retaining the number.
What happens to zero values?
The custom format [>0]"Yes";[<0]"No";"" displays zero as blank. The separate-column formula also returns an empty string for zero.
Can I still calculate with cells that display Yes or No?
Yes, if you used the custom number format: the underlying values remain numeric. If you used a formula in a separate column, calculate with the original numeric cells instead.
How do I change the green or red formatting later?
Select the formatted cells and open Home > Conditional Formatting > Manage Rules. Edit the greater-than-zero or less-than-zero rule and choose a different format.




