Data Import & Export

How to Fix Excel Comparison Errors for Imported Text and General Values

John WilsonJohn Wilson Nov 2, 2026 869 views

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.

How to Fix Excel Comparison Errors for Imported Text and General Values
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 you start

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.

Solution 1Recommended

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.

1
Select a Blank Cell

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).

2
Enter the Cleaning Formula

Type the formula =TRIM(SUBSTITUTE(A1,CHAR(160),"")) and press Enter.

3
Apply to the Entire Column

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.

4
Compare the Normalized Results

Use your preferred comparison method, such as the EXACT function or VLOOKUP, on this newly created column against your target list.

Remove Hidden Nonbreaking Spaces Using Formulas
Pro Tip: To overwrite your original messy data, copy the new formula column, right-click the original column, and choose 'Paste Special' > 'Values'.
Efficient Data Cleaning

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. 1. Open File: Launch WPS Spreadsheet and seamlessly open your CSV or XLSX dataset.
  2. 2. Clean Data: Use the =TRIM(SUBSTITUTE(A1,CHAR(160),"")) formula to automatically strip invisible spaces.
  3. 3. Paste Values: Highlight the cleaned results, right-click, and select 'Paste as Values' to remove the formulas.
  4. 4. Compare Data: Use the =EXACT() function or Conditional Formatting to verify that your normalized rows perfectly match.
Fully compatible with Microsoft Excel formulas, CSV, and XLSX formats.Built-in robust text handling tools to easily remove hidden characters.Lightweight application that handles large datasets quickly without lagging.
microsoft office alternative - wps office

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.