+ Reply to Thread
Results 1 to 5 of 5

using vlookup to find exact match

  1. #1
    Janice Lee via OfficeKB.com
    Guest

    using vlookup to find exact match

    Hi,
    I have two spreadsheets with same field called IDs.
    I want to know whether the IDs in the ID column of the first sheet is in
    the ID column of the second.
    I want to create a new column on the first sheet to return Yes/No depending
    on the result. I think I could use vlookup formula but have no idea how.
    Can anyone help me?
    Thank you!

    --
    Message posted via http://www.officekb.com

  2. #2
    Trevor Shuttleworth
    Guest

    Re: using vlookup to find exact match

    Janice

    One way:

    =IF(ISNA(VLOOKUP(A1,Sheet2!A:A,1,FALSE)),"no","yes")

    and drag down. Assumes your ID column is column A on both sheets.

    Regards

    Trevor


    "Janice Lee via OfficeKB.com" <[email protected]> wrote in message
    news:[email protected]...
    > Hi,
    > I have two spreadsheets with same field called IDs.
    > I want to know whether the IDs in the ID column of the first sheet is in
    > the ID column of the second.
    > I want to create a new column on the first sheet to return Yes/No
    > depending
    > on the result. I think I could use vlookup formula but have no idea how.
    > Can anyone help me?
    > Thank you!
    >
    > --
    > Message posted via http://www.officekb.com




  3. #3
    Alan Beban
    Guest

    Re: using vlookup to find exact match

    Janice Lee via OfficeKB.com wrote:
    > Hi,
    > I have two spreadsheets with same field called IDs.
    > I want to know whether the IDs in the ID column of the first sheet is in
    > the ID column of the second.
    > I want to create a new column on the first sheet to return Yes/No depending
    > on the result. I think I could use vlookup formula but have no idea how.
    > Can anyone help me?
    > Thank you!
    >

    Without a lookup formula

    =IF(COUNTIF(Sheet2!A:A,A1)>0,"yes","no")

    filled down as far as required.

    Alan Beban

  4. #4
    Janice Lee via OfficeKB.com
    Guest

    Re: using vlookup to find exact match

    For the given formula,

    =IF(ISNA(VLOOKUP(A1,Sheet2!A:A,1,FALSE)),"no","yes")

    What is "ISNA" and what does each value separated with comma represent?
    Thanks in advance!

    --
    Message posted via http://www.officekb.com

  5. #5
    Registered User
    Join Date
    03-23-2005
    Posts
    45
    Janice -
    The formula Alan gave you should work. What the formula is saying is IF the Vlookup does not find a match (thats what ISNA means), then bring back a "no" otherwise bring back a "yes". The Vlookup statement itself is broken down as follows:
    A1 represents the cell where your ID'd start in sheet 1

    Sheet2!A:A represents where you want to search for a match (in this case, on sheet 2 in all of column A)

    1 means bring back the 1st column in your range (which in this case is only column A, so you only have 1 column)

    false means you want an exact match

    I hope this helps. Good luck!

+ 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