+ Reply to Thread
Results 1 to 8 of 8

VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

  1. #1
    Registered User
    Join Date
    06-04-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2013
    Posts
    4

    VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Hi there. I am trying to use some combination of IF and VLOOKUP to pull back a status field based on a location ID, and I am not having much luck.

    In Table2, I have a list of devices associated with locations, and each has a LocationID that corresponds back to Table1, which contains the location data, including LocationID and LocationStatus. What I need to do is use the LocationID from Table2 to match back to the corresponding LocationID in Table1 and return the text from the LocationStatus field for entries ONLY with the LocationStatus of "Ordered".

    I realize this is probably really simple, but I am new to the world of VLOOKUP. Any help is appreciated.

  2. #2
    Forum Contributor
    Join Date
    10-30-2011
    Location
    Doha
    MS-Off Ver
    MS office 365
    Posts
    701

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Hi towanda7,

    Please upload a sample workbook with some data. I will look at it.
    Cheers,

    Joshi
    Being with a winner makes you a winner

  3. #3
    Forum Contributor BenMiller's Avatar
    Join Date
    12-06-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Assuming sheet1 has location ID in column A and location status in column B. Assumin sheet 2 has location ID in column D, starting in D2. Put this in a new column on sheet 2:

    =VLOOKUP(D2,Sheet1!A:B,2,0)

    Let us know your actual ranges and we'll change the formula.
    "I'm not a perfectionist; I'm just perfect."

  4. #4
    Registered User
    Join Date
    06-04-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Thank you. Doesn't that just return LocationStatus for all entries regardless of the value of that status? I would like it to only return data where LocationStatus is "Ordered".

    The data on sheet one is formulated as Table1 and has 6 columns. Column A is LocationID, and Column E is LocationStatus.

    The data on sheet two is formulated as Table2 and has LocationID in Column A.

    I was using =VLOOKUP(A2,Table1,5,FALSE), which gave me back a LocationStatus value for all rows, then I was just filtering to get to "Ordered", but I would prefer it only return results where LocationStatus = "Ordered".

  5. #5
    Registered User
    Join Date
    06-04-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    I've attached a sample workbook.
    Attached Files Attached Files

  6. #6
    Forum Contributor BenMiller's Avatar
    Join Date
    12-06-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Sorry, I read your question a bit too quickly. Try =IF(VLOOKUP(A2,Table1,5,0)="Ordered","Ordered","")

  7. #7
    Registered User
    Join Date
    06-04-2013
    Location
    Denver, Colorado
    MS-Off Ver
    Excel 2013
    Posts
    4

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    Bingo! Thanks so much.

  8. #8
    Forum Contributor BenMiller's Avatar
    Join Date
    12-06-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    254

    Re: VLOOKUP for Specific Text in One Table Where an ID Matches in Another Table

    No problem... glad I could help! Appreciate the feedback

+ 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