+ Reply to Thread
Results 1 to 6 of 6

two cell appended vlookup

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    two cell appended vlookup

    Hello. How could I create a vlookup using text from two cells joined together. For example, A1 has Jim and B1 has 55, and I want to use A155 as the lookup value. Is it better to just concatenate first or can I create a vlookup and concatenate within the formula?

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,414

    Re: two cell appended vlookup

    You'll get the same results with both methods.

    Either:
    =VLOOKUP(CONCATENATE(A1,B1),$E$1:$G$100,3,0)
    or

    =VLOOKUP(C1,$E$1:$G$100,3,0)
    where
    C1=CONCATENATE(A1,B1)
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: two cell appended vlookup

    This would also work...
    =VLOOKUP(A1&B1,$E$1:$G$100,3,0)

    Note that column E (the 1st column of your range) would need to contain that combined value, somewhere
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    08-14-2013
    Location
    LA Baby!!
    MS-Off Ver
    Excel 2007
    Posts
    1,598

    Re: two cell appended vlookup

    I just realized that I need to have a "-" between the two cells. The two cells are numbers and I think when I do this =B3&"-"&C3 it returns a text value because it's not finding it in the lookup. How can I make it keep the values as numbers?

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: two cell appended vlookup

    Quote Originally Posted by ammartino44 View Post
    I just realized that I need to have a "-" between the two cells. The two cells are numbers and I think when I do this =B3&"-"&C3 it returns a text value because it's not finding it in the lookup. How can I make it keep the values as numbers?
    When you join 2 values (using & or Concat) they default to text. If you are searching in a column with contents like 123-456, that is also not a number, it is text

  6. #6
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Quebec, Canada
    MS-Off Ver
    2013
    Posts
    232

    Re: two cell appended vlookup

    If there's a - in between, it can't be a number, since 136-12 is not a number. You need to format it the same way it is in your vlookup table. Could you provide an example perhaps?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count appended to cell value
    By Adrian Payne in forum Excel General
    Replies: 5
    Last Post: 01-20-2015, 09:48 AM
  2. [SOLVED] Signature is not always appended
    By millz in forum Suggestions for Improvement
    Replies: 9
    Last Post: 01-13-2014, 02:23 AM
  3. Date appended to filename
    By antonf in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-18-2010, 12:26 PM
  4. Save xls with date appended to end of filename
    By mattmac in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2008, 06:41 AM
  5. What does the '#' character mean when appended to a number?
    By Marilyn Kilian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-08-2006, 01:15 PM
  6. [SOLVED] Files opening with a number appended
    By Rich May in forum Excel General
    Replies: 1
    Last Post: 03-10-2005, 02:06 PM

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