+ Reply to Thread
Results 1 to 3 of 3

Thread: trouble with vlookup & referencing cell "to the left"

  1. #1
    Registered User
    Join Date
    09-14-2009
    Location
    here
    MS-Off Ver
    Excel 2003
    Posts
    3

    trouble with vlookup & referencing cell "to the left"

    Hello and thanks for taking the time to ready, & hopefully help an inexperienced excel user.

    I have a very large list of unique ID's, each of which has a specific name attached to the ID. In a separate worksheet I have all the unique ID's and their names listed side-by-side in a long list.

    I need to write a function that works as follows,

    1. Look at the unique ID in the cell TO THE LEFT
    2. Find the matching name in the master list of unique IDs
    3. Display the name of the unique ID in the current CELL that has this equation.


    This is what I have mustered so far:

    =VLOOKUP(F37,ProjectValues,2,FALSE)

    The problem is when I copy this code to another cell on another sheet it doesn't immediately adjust to grab data from the cell to the left. I've tried searching, but I wasn't able to get the dynamic references & functions to work in place of that "F37".

    Is this the easiest way to do this? If not what can we do to make that F37 a dynamic reference "1 cell to the left of this one?"

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636

    Re: trouble with vlookup & referencing cell "to the left"

    To grab from the left.. you need Index/Match

    e.g

    =Index(A1:A100,Match(F37,B1:B100,0))

    this will match F37 to B1:B100 and return what is in A1:A100
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Forum Guru JBeaucaire's Avatar
    Join Date
    03-21-2008
    Location
    Bakersfield, CA
    MS-Off Ver
    2010
    Posts
    19,224

    Re: trouble with vlookup & referencing cell "to the left"

    Once you switch to INDEX/MATCH, you'll never go back.

    It does the work of VLOOKUP, HLOOKUP, LOOKUP and suffers from none of their restrictions.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    “None of us is as good as all of us” - Ray Kroc
    “Actually, I *am* a rocket scientist.” - JB (little ones count!)

+ 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.2.0