+ Reply to Thread
Results 1 to 7 of 7

Weirdest problem ever - excel not matching matching text

  1. #1
    Registered User
    Join Date
    05-19-2015
    Location
    California
    MS-Off Ver
    2010
    Posts
    2

    Weirdest problem ever - excel not matching matching text

    I cant explain it really well other than showing an example in file, so I have attached it here.

    Basically I downloaded a file with hourly data. I copy pasted it to a new excel document. The index key of the data is two time stamps with the word "to" in between. Like so: [2014-11-18 01:00:00*to 2014-11-18 02:00:00]

    For the purpose of what I'm doing, I manually recreated a table with some identical index strings, so I would be able to use LOOKUP to find the value for any of the rows in the original data. Let's say I wanted the value for the time slot 2014-11-18 01:00:00*to 2014-11-18 02:00:00, I would use a lookup function in the table to get the value corresponding to that timeslot.

    The only problem is, even if I type the PERFECT match of the index string into my lookup formula, it still comes out with an #N/A error.

    It shouldnt be formatting, because the 'EXACT' formula ignores formatting, and still returns FALSE when I try to directly match the index key to my manually entered key. I'm thinking it might be something to do with ASCII/HTML character mismatch or something, but really have run out of ideas how to work it.

    /A
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    05-19-2015
    Location
    California
    MS-Off Ver
    2010
    Posts
    2

    Re: Weirdest problem ever - excel not matching matching text

    OK this is even weirder, but after posting I saw that excelforum.com inserted a small * before the word 'to'. That star was not showing up in excel when I copied the data. If I try to enter a * symbol into the lookup formula EUREKA it works... PLEASE tell me whats going on here!

    /A

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Weirdest problem ever - excel not matching matching text

    I copied A2 from the formula bar and pasted it into A6. Your formula works fine. Those strings are not identical. Sometimes non-printable characters will show up in copied data. Try this array formula in E16 and fill down to E17.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Array formulas are not committed in the regular way. You commit by pressing and holding Ctrl + Shift as you hit Enter. You will know that it has been entered successfully when you can see curly braces {} around your formula in the formula bar. You do not type these in yourself. Excel does it for you.

    It counts character 160. These frequently show up when copying/pasting from tables on the internet. They are non-printable and are difficult to detect. E16 has one E17 does not.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Weirdest problem ever - excel not matching matching text

    Furhter to Flame retired's contribution. It is the non-breaking space (Char 160) and you can see exactly where it is here.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Weirdest problem ever - excel not matching matching text

    Thanks Glenn....I failed to complete the thought......past my bedtime. LOL

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,053

    Re: Weirdest problem ever - excel not matching matching text

    I should have added that the formula in brown will substitute an ordinary space (code 32) for any non-breaking spaces (Code 160), allowing the two cells to match exactly.

    FlameRetired - enjoy some rest....

  7. #7
    Registered User
    Join Date
    03-06-2011
    Location
    chennai
    MS-Off Ver
    Excel 2016
    Posts
    46

    Re: Weirdest problem ever - excel not matching matching text

    Hi,

    Please refer to Office.com off line help, which quotes as under:

    "When searching text values in the first column of table_array, ensure that the data in the first column of table_array does not contain leading spaces, trailing spaces, inconsistent use of straight ( ' or " ) and curly ( ‘ or “) quotation marks, or nonprinting characters. In these cases, VLOOKUP might return an incorrect or unexpected value."

    If you remove the spaces, vlookup function executes the result correctly.

+ 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. Replies: 6
    Last Post: 11-26-2014, 11:45 AM
  2. Finding Matching Data in one Column/Adding corresponding matching string value.
    By swade730 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2013, 07:23 PM
  3. Replies: 2
    Last Post: 04-11-2013, 11:14 AM
  4. [SOLVED] Matching a text reference in separate Excel sheets
    By prssmzk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-24-2012, 04:23 AM
  5. Weirdest Excel Problem?
    By NYCKATE132 in forum Excel General
    Replies: 1
    Last Post: 03-22-2007, 04:59 PM

Tags for this Thread

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