Results 1 to 4 of 4

Thread: How to look for a value across two tables and return result of which table the result was found in

  1. #1
    New Member
    Join Date
    Sep 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default How to look for a value across two tables and return result of which table the result was found in

    Long time reader, first time caller,

    I want to look for a value in two tables(columns in sperate worksheets) and have the result come back of which table the value was found in.

    I have tried with If and Vlookup, and can return the result of the first table search, but does not work when searching the second table.

    =IF(VLOOKUP(I83,Rebuild!I:J,1,FALSE)=I83,"Rebuild",IF(VLOOKUP(I83,Retired!I:J,1,FALSE)=I83,"Retired"))


    Any help would much appreciated.

    Gary

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,276
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: How to look for a value across two tables and return result of which table the result was found in

    Will the value of I83 only exist in one of those two sheets?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Dec 2008
    Posts
    6,659
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to look for a value across two tables and return result of which table the result was found in

    If I83 will definitely be in one of the 2 sheets then try

    =IF(ISNUMBER(MATCH(I83,Rebuild!I:I,0)),"Rebuild","Retired")

    If I83 might not be in either then

    =IF(ISNUMBER(MATCH(I83,Rebuild!I:I,0)),"Rebuild",IF(ISNUMBER(MATCH(I83,Retired!I:I,0)),"Retired","No Match"))

  4. #4
    New Member
    Join Date
    Sep 2019
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: How to look for a value across two tables and return result of which table the result was found in

    Thank you!
    I83 might not be there, and the second solution worked perfectly.

    Can see that I was quite some way off in my original formula!

    Thanks again for the help

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •