1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

EXCEL Question - Compare Data across two files, and if found return with a '1'

Discussion in 'Business Applications' started by fisher1711, Aug 23, 2012.

Thread Status:
Not open for further replies.
  1. fisher1711

    fisher1711 Thread Starter

    Aug 23, 2012
    Hi there -

    Thanks in advance for helping.

    Here's the situation:

    • I have TWO excel files
    • 'FILE A' ... Has a full list of over 2,000 entries, each with a unique ID in the far-left column ('A')
    • 'FILE B' ... Has a list of 400 entries with their respective IDs (that are found within the 2,000)
    • I need to compare the data found in File B with that in File A. If they appear in both files, I want a '1' to appear in the cell next to it

    Here's what I need:

    In Column 'B' of "FILE A", I need a formula that will do the following:
    =If A2 is found in the first column in "FILE B", then show '1', if not show nothing

    Does anyone have a solution? I am not certain if a VLOOKUP is the possible solution, and if so, I cannot figure out the correct formula.

    Thanks again,

  2. etaf

    etaf Moderator

    Oct 2, 2003
    First Name:
    should be and then use a IF statement - to test if the vlookup is true or not

    something like
    where xxxxx is the end of the row range
    will do the lookup

    use ISERROR to test if true of false

    and then an IF to add the 1


    are both files open ?

    this is just on two sheets, as an example here


    so if there is an error - ie cannot find the lookup then as its true it returns nothing "" if it is true it returns 1

    Attached Files:

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1066258

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice