+ Reply to Thread
Results 1 to 6 of 6

Vlookup not taking a concatenated value as lookup_value

  1. #1
    Registered User
    Join Date
    07-22-2012
    Location
    Hershey PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Vlookup not taking a concatenated value as lookup_value

    Hi all,
    New member here and I have a problem in this formula =VLOOKUP(I952,SourceData4!$A$2:$K$150,2,FALSE). The contents of cell I 952 is itself a concatenated 5 digit number. Returns a #NA error. If, however, I enter the 5 digit number instead of allowing it to be concatenated, the Vlookup function works correctly.
    Any ideas? all cells have been formatted as numbers.
    Roy

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Vlookup not taking a concatenated value as lookup_value

    hi Roy, welcome to the forum. i am guessing A2:K150 is containing numbers. when you concatenate, you are making it a text. you can try:
    =VLOOKUP(value(I952),SourceData4!$A$2:$K$150,2,FALSE)

    upload an sample if it doesnt work

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup not taking a concatenated value as lookup_value

    Yes, but if you concatenate two numbers they are treated as text values, so try it like this:

    =VLOOKUP(--I952,SourceData4!$A$2:$K$150,2,FALSE)

    The double-minus in front of I952 will convert that value to numeric - you could also multiply by 1 or add zero to do the same (or even put VALUE( ... ) around it).

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    07-22-2012
    Location
    Hershey PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Vlookup not taking a concatenated value as lookup_value

    Thanks folks, Wow, that was fast. I tried multiplying the concatenated value by one. No joy. In fact now the formula does not seem to be calculating at all. Only see the formula in the cell, even though options are set for automatic calculation.

  5. #5
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,731

    Re: Vlookup not taking a concatenated value as lookup_value

    Sounds like that cell has become formatted as Text. Format it as General, then double-click as if to edit it and then press <Enter> to bring about the change in format.

    Hope this helps.

    Pete

  6. #6
    Registered User
    Join Date
    07-22-2012
    Location
    Hershey PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Vlookup not taking a concatenated value as lookup_value

    Thanks Pete !!! Perfect, worked!! This has been a very helpful (first) experience for me. I'll be back, for sure.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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