+ Reply to Thread
Results 1 to 6 of 6

Vlookup with concatenate?

  1. #1
    Registered User
    Join Date
    05-01-2011
    Location
    USA, MN
    MS-Off Ver
    Excel 2007
    Posts
    3

    Vlookup with concatenate?

    Hi people!

    I am having a problem with vlookup. I am wondering if I "=Concatenate" 2 columns then use that concatenated value as the lookup_vlaue in vlookup does it still work? Currently I am getting errors.

    I deal with roughly 1500 observations at work and this would tremendously cut down time.

    The reason I concatenate is because the data is listed as a course number, section number, then CRN. I want to get the CRN. Some courses are such; 6001, 9001, 7002, then the section numbers identifies them. So to make that value a unique number I concatenate and I get 60011 ( this value is now unique to the spreadsheet )

    I attached a demo workbook it only shows a few observations but it is enough to get the point across.

    Please help!!!
    Attached Files Attached Files
    Last edited by Lolprotiens; 05-01-2011 at 09:37 PM. Reason: solved

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concatenate?

    just use
    =INDEX(Sheet1!$C$1:$C$2000,MATCH(A2&B2,INDEX(Sheet1!$A$1:$A$2000&Sheet1!$B$1:$B$2000,0),0))
    then you can do away with concatenated columns f altogether
    (edited to correct index inside match)
    Last edited by martindwilson; 05-01-2011 at 06:58 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    05-01-2011
    Location
    USA, MN
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup with concatenate?

    Alright, that worked considering they all matched up. This is just a demo though, Course & sect numbers will never line up on both sheets.

    To elaborate better, Sheet 1 will be where I want to take the CRN from, Sheet 1 will list all of the courses, but I am not using all of the courses, so thats why I figured I would have to use vlookup but I am not sure.

    Thank you for your quick response but sorry I didn't elaborate on that.

    Attached is more of what it would like.
    Attached Files Attached Files

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Vlookup with concatenate?

    same formula will still work
    Attached Files Attached Files
    Last edited by martindwilson; 05-01-2011 at 08:03 PM.

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

    Re: Vlookup with concatenate?

    I think this works, too.

    =INDEX(Sheet1!C:C,MATCH(A2,Sheet1!A:A,0)+B2-1)

  6. #6
    Registered User
    Join Date
    05-01-2011
    Location
    USA, MN
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Vlookup with concatenate?

    Wow! I must have messed it up somehow, it works now!

    Thanks people!!!

+ 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