+ Reply to Thread
Results 1 to 5 of 5

Vlookup with inconsistent lookup value length

  1. #1
    Registered User
    Join Date
    03-05-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    75

    Vlookup with inconsistent lookup value length

    I need to perform a vlookup where only part of the match in the Table Array will match the Lookup Value. The matches will always be from the left hand side. I was thinking of a vlookup(left(len type formula so that it only searches the same amount of characters as contained in the Lookup Value but I can't get it to work. See the attached example if I am not describing the problem well enough. Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Vlookup with inconsistent lookup value length

    You can use wildcards in the VLOOKUP if you use an exact match

    Please Login or Register  to view this content.
    in this instance you could also usee SUMIF rather than VLOOKUP

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Vlookup with inconsistent lookup value length

    Maybe:

    =VLOOKUP(A2&"*",'Table Array'!$A$2:$B$12,2,0)

  4. #4
    Registered User
    Join Date
    03-05-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Vlookup with inconsistent lookup value length

    Great minds think alike! Thanks guys. Not sure why I didn't think of wildcards.

    The sumif scenario sounds interesting too, I would love to hear how that would work.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Vlookup with inconsistent lookup value length

    Exactly the same concept except that SUMIF will aggregate values if more than one instance exists at source:

    Please Login or Register  to view this content.

+ 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