Formatting Issues

Display Yes or No and Color Positive and Negative Values in Excel

Algirdas JasaitisAlgirdas Jasaitis Nov 18, 2026 870 views

Question details

Display Yes for positive numbers and No for negative numbers, with green and red formatting respectively.

Display Yes or No and Color Positive and Negative Values in Excel
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the numeric cells

Select the range containing the positive and negative numbers.

2
Set the custom format

Press Ctrl+1, open the Number tab, select Custom, and enter [>0]"Yes";[<0]"No";"" in the Type box. Click OK.

3
Color positive values

With the range still selected, go to Home > Conditional Formatting > Highlight Cells Rules > Greater Than. Enter 0 and choose a green format.

4
Color negative values

Go to Home > Conditional Formatting > Highlight Cells Rules > Less Than. Enter 0 and choose a red format.

Use a custom number format and conditional formatting
The numbers remain unchanged: The custom format changes only what is displayed. Zero appears blank, and calculations can still use the underlying numeric values.
WPS Spreadsheet

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. 1. Open the worksheet: Open your Excel file in WPS Spreadsheet and select the numeric cells.
  2. 2. Apply the display format: Right-click the selection, choose Format Cells, and select Number > Custom. Enter [>0]"Yes";[<0]"No";"" and confirm.
  3. 3. Add the positive-value rule: Choose Home > Conditional Formatting > Highlight Cells Rules > Greater Than, enter 0, and select a green format.
  4. 4. Add the negative-value rule: Choose Home > Conditional Formatting > Highlight Cells Rules > Less Than, enter 0, and select a red format.
Display Yes and No while preserving numeric valuesHighlight positive and negative values in different colorsOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formatting tools for free
microsoft office alternative - wps office

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.