+ Reply to Thread
Results 1 to 7 of 7

Seemingly Identical Text Strings Return False When Compared

  1. #1
    Registered User
    Join Date
    04-09-2016
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    4

    Seemingly Identical Text Strings Return False When Compared

    I'm having an issue very similar to this thread - except that I tried the (ingenious) code solution mentioned and find that the two text strings I am seeking to match have the exact same code but still return false using the =C2=D2 method. You'll note that in this example (matching species names) that the two names appear to match exactly, but excel is not recognizing the match. Help, please?
    Attached Files Attached Files

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: Seemingly Identical Text Strings Return False When Compared

    Your formula is wrong in D3 which is why you are not seeing the true difference in the strings.

    =CODE(MID($D$2,$B3,1))

    It's a non-breaking space and space issue.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,780

    Re: Seemingly Identical Text Strings Return False When Compared

    It is something to do with the SPACE character used - if you go through and replace the spaces between the words, then you will get a match. Maybe a find and replace on your data will resolve the issue?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  4. #4
    Registered User
    Join Date
    04-09-2016
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    4

    Re: Seemingly Identical Text Strings Return False When Compared

    Quote Originally Posted by Andy Pope View Post
    Your formula is wrong in D3 which is why you are not seeing the true difference in the strings.

    =CODE(MID($D$2,$B3,1))

    It's a non-breaking space and space issue.
    *Facepalm* Of course - thanks!! That's what I get for staring at this for an hour.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,780

    Re: Seemingly Identical Text Strings Return False When Compared

    To find and replace:

    In the find box, type ALT+0160.

    In the replace box, type SPACE (space bar once).

  6. #6
    Registered User
    Join Date
    04-09-2016
    Location
    New York, NY
    MS-Off Ver
    2007
    Posts
    4

    Re: Seemingly Identical Text Strings Return False When Compared

    A great weight has been lifted! Thank you all so much.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    90,780

    Re: Seemingly Identical Text Strings Return False When Compared

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Identical text strings return false when compared
    By Skiingbeancounter in forum Excel General
    Replies: 13
    Last Post: 09-18-2023, 05:43 PM
  2. [SOLVED] Return true or false if cell contains multple strings of cells
    By degromek in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-25-2015, 12:00 AM
  3. Identical text strings return false when compared
    By bimalroyps2015 in forum Excel General
    Replies: 2
    Last Post: 04-13-2015, 12:18 PM
  4. [SOLVED] Mark similar but not identical text strings
    By n_ant in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2014, 06:00 PM
  5. Formula to find and return text string within a cell full of text strings
    By LightingPop in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-03-2013, 11:45 PM
  6. Replies: 3
    Last Post: 05-28-2011, 01:43 PM
  7. Seemingly identical text strings not matching
    By mr0range in forum Excel General
    Replies: 3
    Last Post: 08-27-2009, 05:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1