How to Fix Excel Treating True and False Values as Text
Question details
Imported or exported database records containing True and False are being recognized as text strings instead of logical Boolean values, causing formula calculation errors.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Importing exported data from external systems like Zoho CRM into a spreadsheet for analysis.
- Observed behavior
- Excel fails to recognize True and False as Boolean values, formatting them as text. This causes logical criteria in COUNTIF formulas to return a count of zero or incorrect results.
Verify that your COUNTIF formula is correct and ensure there are no hidden leading or trailing spaces in the cells containing the True and False values.
Use Text to Columns to Reevaluate the Data
Use the Text to Columns wizard to force the spreadsheet to re-parse the entire column, automatically converting the text strings into valid Boolean values.
When data is imported from external sources, spreadsheets often default to assigning a text format to unrecognized data types. The Text to Columns feature can rapidly refresh the column's data format without needing complex formulas.
Click the column header to highlight the entire column containing the problematic True and False text values.
Navigate to the Data tab on the top ribbon and click on the 'Text to Columns' button.
In the wizard that appears, keep the default 'Delimited' option selected and click 'Next' twice without checking any delimiter options.
On the final step of the wizard, ensure the 'Column data format' is set to 'General', and click 'Finish'.
Correct the COUNTIF Formula Syntax
Remove quotation marks from your formula to ensure it is checking for logical Boolean conditions rather than text strings.
Seamlessly Clean and Evaluate Exported Data with WPS Office
WPS Spreadsheet offers robust data processing tools perfectly capable of handling database exports, rapidly converting text to logical values, and calculating Boolean formulas accurately.
- 1. Open your file: Launch WPS Spreadsheet and open your exported CSV or Excel database file.
- 2. Select the data: Highlight the column containing the text-formatted True and False values.
- 3. Run Text to Columns: Go to the Data tab, select 'Text to Columns', and click through the wizard.
- 4. Set format to General: Choose 'General' as the data format on the last step and click 'Finish'.
- 5. Calculate correctly: Use your standard COUNTIF formulas without quotation marks to analyze your properly formatted Boolean data.

Frequently Asked Questions
Why does exported CRM data show True and False as text?
External systems like Zoho CRM often export data in plain text or CSV formats to ensure maximum system compatibility. When this plain text is imported, spreadsheet software may read these values literally as text strings rather than interpreting them as logical Boolean values.
How can I quickly check if a cell is text or a Boolean value?
You can use the built-in information functions. Type =ISLOGICAL(A1) in an empty cell next to your data. If it returns TRUE, the software recognizes it as a valid Boolean value. If it returns FALSE, it is likely being treated as text.
Can I use Find and Replace to fix text Booleans?
Yes, in many cases, using the Find and Replace tool (Ctrl+H) to search for TRUE and replace it with TRUE can force the spreadsheet to re-evaluate the cell format. However, the Text to Columns method is generally faster and more reliable for bulk data correction.




