How to Fix Excel Displaying Yes or No Instead of Entered Numbers
Question details
Numbers entered into Excel cells are automatically converted and displayed as text, specifically 'Yes' or 'No'.

- 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 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.
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.
Highlight the specific cells or columns where numbers are changing to Yes or No.
Right-click the selected area and choose 'Format Cells', or press the Ctrl + 1 keyboard shortcut.
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"'.
Select 'General' or 'Number' from the Category list and click 'OK' to restore the normal numerical display.

Inspect and Modify VBA Event Codes
If formatting is correct, background VBA code triggered by cell changes might be overriding your inputs.
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. Open File: Launch WPS Spreadsheets and open your affected workbook.
- 2. Reset Formatting: Select the problematic cells, right-click, choose 'Format Cells', and apply the 'General' format.
- 3. Access Developer Tools: Navigate to the 'Tools' tab and click on 'Macro' to open the Visual Basic Editor.
- 4. Fix VBA Scripts: Inspect the active sheet's code and remove any unauthorized scripts that auto-replace numbers with text.

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.




