How to Fix Excel Comparison Errors for Imported Text and General Values
Question details
Users need to accurately compare datasets imported from sources like CSVs and QuickBooks, but standard comparison methods fail because the data contains mismatched formatting, text-forcing formulas, or hidden characters.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Comparing two lists of data imported from different files (CSV and QuickBooks XLSX) to find matches or differences.
- Observed behavior
- Values that appear visually identical fail to match during comparison due to underlying differences such as nonbreaking spaces, mismatched data types (Text vs. General), or values formatted as formulas (e.g., ="140209376008436290").
Before proceeding, determine your exact comparison goal (e.g., verifying row-by-row matches or using VLOOKUP across lists) and create a backup of your original imported datasets.
Remove Hidden Nonbreaking Spaces Using Formulas
Use this method to strip out invisible characters that prevent visually identical values from matching, which is the most common issue with imported data.
Data exported from web platforms or accounting software like QuickBooks often includes nonbreaking spaces (CHAR 160) for formatting. The standard TRIM function cannot remove these specific characters, requiring a combination of the SUBSTITUTE and TRIM functions.
Click on a blank cell adjacent to the first piece of imported data you want to clean (e.g., cell B1 if your data is in A1).
Type the formula =TRIM(SUBSTITUTE(A1,CHAR(160),"")) and press Enter.
Click the cell with the formula and drag the fill handle (the small square at the bottom right) down to apply it to all rows containing data.
Use your preferred comparison method, such as the EXACT function or VLOOKUP, on this newly created column against your target list.

Convert Formulas to Plain Text Using Paste Special
Use this approach when imported CSV values appear as text-forcing formulas (e.g., ="1402093760") while your target comparison values are regular text strings.
Standardize Data Formatting with Text to Columns
Quickly resolve mismatches caused by General vs. Text cell formatting without needing to create extra columns with formulas.
Clean and Compare Imported Data Seamlessly with WPS Spreadsheet
WPS Spreadsheet provides powerful data processing features, including formula evaluation, Paste Special, and Text to Columns, making it incredibly simple to clean and match datasets imported from various sources like CSVs and QuickBooks.
- 1. Open File: Launch WPS Spreadsheet and seamlessly open your CSV or XLSX dataset.
- 2. Clean Data: Use the =TRIM(SUBSTITUTE(A1,CHAR(160),"")) formula to automatically strip invisible spaces.
- 3. Paste Values: Highlight the cleaned results, right-click, and select 'Paste as Values' to remove the formulas.
- 4. Compare Data: Use the =EXACT() function or Conditional Formatting to verify that your normalized rows perfectly match.

Frequently Asked Questions
Why do values imported from CSV files appear as formulas like ="12345"?
Many software systems deliberately export CSVs with this formatting to force spreadsheet programs to treat the data as text. This prevents leading zeros from being dropped and stops long serial numbers from being converted into scientific notation.
How do I know if my cells contain hidden nonbreaking spaces?
If two visually identical cells return FALSE when compared with the EXACT function, one likely contains a hidden character. You can use the LEN() function on both cells; if the character count is longer than the visible text, hidden spaces are present.
Why doesn't the standard TRIM function remove all hidden spaces?
The standard TRIM function only removes regular space characters (represented by CHAR 32). It does not detect or remove nonbreaking spaces (CHAR 160), which are frequently generated by web page exports and accounting systems.
How can I quickly convert text numbers into actual numbers for comparison?
You can multiply the text column by 1 using Paste Special, wrap the cell reference in a VALUE() function, or use the Text to Columns wizard to convert the formatting back to 'General' numbers.




