+ Reply to Thread
Results 1 to 4 of 4

Concatenate Values from a Vlookup

  1. #1
    Registered User
    Join Date
    01-21-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Concatenate Values from a Vlookup

    Hello,

    What I am trying to do is concatenate 2 different values from a vlookup in the macro code instead of having the formulas on the spreadsheet.

    For example, cell A1 contains the number 123. If you vlookup 123, column 2 of the range you are looking up contains "Car" and column 3 contains "Part".

    Therefore, I would want cell B2 to display "Car Part".

    I thought something like FormulaR1C1 = "=VLOOKUP(A1, Range, 2, 0)"&"=VLOOKUP(A1, Range, 3, 0)" would work.

    Any have an idea on how to do this?

    Thank you!

  2. #2
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Concatenate Values from a Vlookup

    Maybe if you remove the second equal sign it may work; i.e
    Please Login or Register  to view this content.
    Note that I used formula instead of formular1c1; this is because you used A1 style referencing in your code.

  3. #3
    Registered User
    Join Date
    01-21-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    21

    Re: Concatenate Values from a Vlookup

    Other than the removal of the R1C1, I don't see a difference, unless I'm not seeing something.

  4. #4
    Forum Contributor Mayda89's Avatar
    Join Date
    09-13-2012
    Location
    New York
    MS-Off Ver
    Excel 2010
    Posts
    192

    Re: Concatenate Values from a Vlookup

    You're right, I forgot to make the adjustment that I wrote

    The code should be like this I suppose:
    Please Login or Register  to view this content.
    Hope it helps,
    Cheers

+ 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