Confusion with strings

TomCon

Active Member
Joined
Mar 31, 2011
Messages
373
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Lets say this string is in A1.
Mike Trout\troutmi01
B1 has this formula
=LEFT(A1,FIND("\",A1)-1)
And therefore the value in B1 is displayed as follows.
Mike Trout
Now in C1 i put this formula
B1="Mike Trout"
C1's value is returned as FALSE.

Why doesn't C1 return TRUE? I expected it to return TRUE. It seems like it is TRUE.

If i change the contents of B1, and instead of that formula, i just type the string "Mike Trout" (no quotes of course), then C1 correctly returns TRUE.

I see the same analogous issue with the MATCH function, if B1 has the formula, MATCH does not match the string "Mike Trout" in its arguments, but if B1 has no formula and you just type "Mike Trout" as a constant string there, it matches.

I guess my question is, how can i get equality or MATCH, to the result of a formula as i illustrate in B1, to work and return TRUE when what i am trying to match is a string that does indeed match the evaluation result of the formula in B1.

Thanks for clarifying this for me!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I suspect that there is something odd in the data in A1 - eg you copied it from a web page and the space is actually a non-breaking space (character 160) not a regular space (character 32). If you retype the data in A1 manually, with the original formulas in place, what results do you get?
 
Upvote 0
Solution
Yes, that is it, it is Character 160. Wow, the things you have to be aware of. Seeing is not believing! Thanks much!
Tom
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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