VBA & Macro Problems

How to Fix Excel Displaying Yes or No Instead of Entered Numbers

Natalie TaylorNatalie Taylor Nov 4, 2026 870 views

Question details

Numbers entered into Excel cells are automatically converted and displayed as text, specifically 'Yes' or 'No'.

How to Fix Excel Displaying Yes or No Instead of Entered Numbers
Product
Microsoft Excel
Device & OS
not provided
Scenario
Entering numerical data into a spreadsheet cell
Observed behavior
The cell unexpectedly replaces or displays the entered numerical value as the text string 'Yes' or 'No'.
Before you start

Before modifying VBA code or changing cell formatting across your spreadsheet, it is highly recommended to save a copy of your workbook to prevent accidental data loss.

Solution 1Recommended

Check and Reset Custom Cell Formatting

Use this solution to ensure that a custom number format isn't translating your numerical inputs (like 1 or 0) into text.

Excel allows users to set custom formats that can mask the underlying data. Sometimes, a format is applied that instructs Excel to display positive numbers as 'Yes' and zero or negative numbers as 'No'. Resetting the format resolves this visual issue.

1
Select the Affected Cells

Highlight the specific cells or columns where numbers are changing to Yes or No.

2
Open Format Cells Menu

Right-click the selected area and choose 'Format Cells', or press the Ctrl + 1 keyboard shortcut.

3
Inspect Number Category

Navigate to the 'Number' tab. Look at the 'Category' list on the left to see if 'Custom' is selected. Check if the type box contains formatting rules like '"Yes";"Yes";"No"'.

4
Change to General

Select 'General' or 'Number' from the Category list and click 'OK' to restore the normal numerical display.

Check and Reset Custom Cell Formatting
Manage Macros and Formatting Easily

Edit Macros and Formatting Flawlessly in WPS Office

WPS Spreadsheets provides a highly compatible environment for managing Excel files. You can effortlessly adjust custom cell formatting and inspect VBA macros to fix unexpected display issues using an intuitive interface.

  1. 1. Open File: Launch WPS Spreadsheets and open your affected workbook.
  2. 2. Reset Formatting: Select the problematic cells, right-click, choose 'Format Cells', and apply the 'General' format.
  3. 3. Access Developer Tools: Navigate to the 'Tools' tab and click on 'Macro' to open the Visual Basic Editor.
  4. 4. Fix VBA Scripts: Inspect the active sheet's code and remove any unauthorized scripts that auto-replace numbers with text.
Fully compatible with Microsoft Excel formats (.xlsx, .xlsm)Native support for viewing and editing VBA macrosAdvanced cell formatting options for precise data displayLightweight application that runs smoothly on Windows, Mac, and Linux
microsoft office alternative - wps office

Frequently Asked Questions

Why does entering 1 turn into 'Yes' and 0 turn into 'No' in Excel?

This generally happens because a custom boolean cell format has been applied to the spreadsheet, or a background VBA macro is specifically programmed to replace binary inputs (1 and 0) with these text strings automatically.

Can Data Validation cause numbers to change to text automatically?

No, Data Validation only restricts what users can enter into a cell (such as providing a dropdown list or showing an error alert). It does not automatically change or format the raw value you typed.

How do I turn on the Developer tab to check VBA code?

Go to File > Options > Customize Ribbon. In the right-hand pane, check the box next to 'Developer' and click OK. The Developer tab will now be visible on your main Excel ribbon.