+ Reply to Thread
Results 1 to 13 of 13

Compare two excel files and display true or false

  1. #1
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Compare two excel files and display true or false

    I have two excel files with three columns each..I need to compare the two files with unique key which is the column 1 and display true for match and false for no match

    A B C A B C
    1 test 123 1 test1 123
    2 junk 456 2 junk 456


    I need

    1 -False
    2. true
    Please help
    Attached Files Attached Files
    Last edited by sravanthi009; 07-29-2011 at 04:04 PM.

  2. #2
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Campare two excel files and display true or false

    Hi, Welcome to the Forum,

    Could you post a workbook with a some sample data?

    Are you looking at 2 workbooks
    or 2 worksheets in the same workbook?

    ..
    Thank You, Mike

    Some Helpful Hints:

    1. New members please read & follow the Forum Rules
    2. Use Code Tags...Place[code]Before the first line and[/code] After the last line.
    3. If you are pleased with a solution mark your post SOLVED.
    4. Thank those who have help you by clicking the scales at the top right of the post.

    Here...

  3. #3
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Campare two excel files and display true or false

    Thanks for the quick reply...I am looking to compare two workbooks and display result with true false in the third...I have attached the files to the first post
    Last edited by sravanthi009; 07-29-2011 at 03:27 PM.

  4. #4
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Campare two Workbooks and display true or false in the third Workbook

    I have two excel files with three columns each..I need to compare the two files with unique key which is the column 1 and display true for match and false for no match in the third file
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Campare two excel files and display true or false

    Ok Here you go, Use the button on the workbook attached to run your test.

    Create a new folder on your desktop and name it "Your Folder"
    This copy the 2 workbooks from your first post in that folder

    open this script and press the test button. I placed a stop command in all you need to do is change the path from my desktop to yours.

    Most likely you will only need to remove the RNG and put your name in.
    an easy way to tell is open the folder you made above and look in the address bar and copy that line and replace it with what is in mine.

    once you have your path in you can remove the stop and press F5

    The script compares the first workbook to the second and the second workbook to the first.

    It places the results in the compare workbook in col A and B and C and D

    The reset just clears the data.

    But it all depends on what your looking to compare,

    Let me know if you need changes.

    ...
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Campare two excel files and display true or false

    Thank you very much for the answer..I am getting object doesnt support this action...

    I am using 2007 excel....

  7. #7
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare two excel files and display true or false

    looks like Application.FileSearch is not supported in 2007...

    any way...

    if column 1 from workbook 1 exist in any column in workbook2 then compare column b if it matches print true with column 1 and 2 else print false with column 1 and 2

  8. #8
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Compare two excel files and display true or false

    When your profile shows Excel 2003, it's hard for us to guess that you're using Excel 2007.
    Entia non sunt multiplicanda sine necessitate

  9. #9
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare two excel files and display true or false

    I am new to the site and did not notice when asking a question...I sincerely apologize for wasting time...

  10. #10
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare two excel files and display true or false

    any one please help...I need this badly..

    if column 1 from workbook 1 exist in any column in workbook2 then compare column b if it matches print true with column 1 and 2 else print false with column 1 and 2

    if(worksheet1.column1=worksheet2.column1) then campare worksheet1.column2 with worksheet2.column2 if it matches display worsheet 1.column1,worksheet1,column2,true
    Last edited by sravanthi009; 07-31-2011 at 07:30 AM.

  11. #11
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare two excel files and display true or false

    Any one ...Please..I need to submit this today.

  12. #12
    Registered User
    Join Date
    07-29-2011
    Location
    dc
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Compare two excel files and display true or false

    any one please.............

  13. #13
    Valued Forum Contributor realniceguy5000's Avatar
    Join Date
    03-20-2008
    Location
    Fl
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    951

    Re: Compare two excel files and display true or false

    Maybe ?

    Please Login or Register  to view this content.

+ 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