Fix Excel Returning FALSE When Comparing Apparently Identical Cells
Question details
The user is trying to compare two cells in Excel that appear identical, but the comparison formula returns FALSE instead of TRUE.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Comparing two text strings or cell values using the exact match operator (=).
- Observed behavior
- The formula =A1=C1 evaluates to FALSE despite the visible text in both cells looking exactly the same.
Before adjusting your formulas, double-click inside the cells in question to visually check if the text cursor reveals any hidden spaces at the end of the text.
Use the TRIM Function for Accurate Comparison
Applying the TRIM function ensures that leading and trailing spaces are removed before the text strings are compared.
Often, data imported from external sources or typed manually contains hidden spaces at the beginning or end of the text. Excel treats "Text" and "Text " as two completely different values.
The TRIM function strips out these extra spaces, allowing Excel to compare the actual alphanumeric content.
Click on an empty cell where you want the comparison result (TRUE or FALSE) to appear.
Type the formula =TRIM(A1)=TRIM(C1), replacing A1 and C1 with the cell references you are trying to compare.
Press Enter. The formula will now return TRUE if the visible text matches, ignoring any hidden leading or trailing spaces.

Use Find and Replace to Remove Spaces
If your data consists of single words and should not contain spaces at all, you can globally find and remove all space characters.
Compare Data Flawlessly in WPS Spreadsheet
WPS Spreadsheet offers powerful data cleaning tools, including the TRIM function, helping you eliminate invisible formatting issues effortlessly.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office, select Spreadsheet, and open your workbook.
- 2. Apply the TRIM formula: In a new column, type =TRIM(A1)=TRIM(C1) to compare the cleaned text.
- 3. Evaluate the results: Press Enter and drag the fill handle down to apply the comparison to the rest of your list.

Frequently Asked Questions
Why does Excel add trailing spaces to my data?
Excel does not automatically add spaces. Trailing spaces are usually introduced when data is imported, exported, or copied from external sources like websites, PDF documents, or third-party database systems.
Can formatting differences cause a FALSE comparison?
No, standard comparison formulas like =A1=C1 only check the underlying value of the cell, not its visual formatting (like bold text or cell color). If it returns FALSE, there is a difference in the actual cell content, such as hidden spaces or non-printing characters.
Is Excel's exact match comparison case-sensitive?
The standard =A1=C1 formula is not case-sensitive. It will return TRUE for 'Apple' and 'apple'. If you need a strict case-sensitive comparison, you must use the EXACT function, such as =EXACT(A1, C1).
What if the TRIM function doesn't fix the FALSE comparison result?
If TRIM doesn't work, the cell might contain non-breaking spaces (character code 160) or other non-printing characters that TRIM cannot remove. You can use the formula =SUBSTITUTE(A1, CHAR(160), "") to remove non-breaking spaces before comparing.




