How to compare two strings in excel

med2062

New Member
Joined
Mar 17, 2016
Messages
7
I have two cells in excel. They are exactly the same. (TN28 01\1 & TN28 01\1) (I have just got them from two different spreadsheets). I have used EXACT function, IF function to compare the strings in the cells. I have also used Text function to convert these cells to text and then used EXACT and IF functions. while these functions must show that the cells have the same strings, I get false answers.(meaning the strings are not the same)
What is the problem? why I don't get a true answer?
Thank's.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Check the fifth character of those two cells... I suspect one of those "spaces" is a normal space (ASCII 32) and the other is a non-breaking space (ASCII 160) which is something you sometimes get when copying text from the web.
 
Upvote 0
Check the fifth character of those two cells... I suspect one of those "spaces" is a normal space (ASCII 32) and the other is a non-breaking space (ASCII 160) which is something you sometimes get when copying text from the web.

Thank's for your response.

Actually these spreadsheets are result from another software. the problem is not only the space i think all the letters have different formats. How can i change their format to the same one?
 
Upvote 0
Actually these spreadsheets are result from another software. the problem is not only the space i think all the letters have different formats. How can i change their format to the same one?
What exactly do you mean by "different formats"?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top