+ Reply to Thread
Results 1 to 4 of 4

How to compare content of two excel sheet ???

  1. #1
    Registered User
    Join Date
    06-22-2012
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    1

    Post How to compare content of two excel sheet ???

    Hello everyone,



    I have a principal excel sheet with lot of data mainly name such as
    bob 1985
    bill 1965
    jim 1984
    ....

    I have another excel sheet with a part of the list of the former main datafile but only certain name with certain charateristics.
    bill 1965
    ....


    I would like to create a dummy in the mother data file which put 1 if the name of the cell is in the second datafile and 0 if not.
    such that
    bob 1985 0
    bill 1965 1
    jim 1984 0
    ....



    Could you help me ???
    Thanks

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

    Re: How to compare content of two excel sheet ???

    Assuming principle sheet is called "Master" and the other sheet is called "Inputs"

    try in Master, C2

    =--(COUNTIFS(A2,"Inputs'!A:A,B2,'Inputs'!B:B)>0)

    copied down.
    Where there is a will there are many ways.

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

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

  3. #3
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: How to compare content of two excel sheet ???

    NBVC

    I don't know if you aware this formula you put in =--(COUNTIFS(A2,"Inputs'!A:A,B2,'Inputs'!B:B)>0) is not working?

    Correct formula would be just simple =COUNTIFS(Inputs!A:A,A2,Inputs!B:B,B2) will count as 1 for Bill 1965
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: How to compare content of two excel sheet ???

    I think there was something in my coffee this morning... I better make a new pot

    Thanks for catching that...

+ 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