+ Reply to Thread
Results 1 to 5 of 5

trouble combining LEFT and MATCH

  1. #1
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    trouble combining LEFT and MATCH

    [SOLVED]

    Hi there,

    I'm trying to use MATCH to match a specific value in column A with the same value in column B. However, the values in column A all have an extra 3 characters, starting with a decimal point. For example, A17 is the value "2190.HZ" and it needs to be matched with the value "2109" in column B. I am using this formula to truncate the value in A17:

    =LEFT(A17,FIND(".",A17,1)-1)

    Which properly returns "2109." However, when I use MATCH on the value returned from above, I get an error.

    So for example, my sheet is setup like this:
    A17=2109.HZ
    B26=2109
    C1=LEFT(A17,FIND(".",A17,1)-1)
    D1=MATCH(C1,B17:B28,0)

    And cell D1 returns an error. Any ideas?

    Thanks!
    Last edited by jakeopolis; 06-12-2013 at 09:38 AM. Reason: solved

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: trouble combining LEFT and MATCH

    The value returned by C1 is a TEXT String (even if it appears numeric) because the Left function returns TEXT.
    But it's likely the values in B17:B28 are actually numbers.

    Try changing C1 to
    =LEFT(A17,FIND(".",A17,1)-1)+0

  3. #3
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: trouble combining LEFT and MATCH

    Quote Originally Posted by Jonmo1 View Post
    The value returned by C1 is a TEXT String (even if it appears numeric) because the Left function returns TEXT.
    But it's likely the values in B17:B28 are actually numbers.

    Try changing C1 to
    =LEFT(A17,FIND(".",A17,1)-1)+0
    yes!! that totally works, thank you. i am confused as to why adding that +0 solves it; could you explain?

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: trouble combining LEFT and MATCH

    Glad to help, thanks for the feedback.
    When excel performas any math operation like + - * and /,
    it attempts to convert any text string that looks like a number into a real number.

  5. #5
    Registered User
    Join Date
    06-12-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: trouble combining LEFT and MATCH

    Quote Originally Posted by Jonmo1 View Post
    Glad to help, thanks for the feedback.
    When excel performas any math operation like + - * and /,
    it attempts to convert any text string that looks like a number into a real number.
    ah, makes sense. very cool! Thanks for your extremely quick help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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