+ Reply to Thread
Results 1 to 5 of 5

Compare two workbooks

  1. #1
    Registered User
    Join Date
    01-06-2013
    Location
    Brussels, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    7

    Compare two workbooks

    Hi,

    I've got two workbooks: both workbooks contain two columns (product_id and code). Workbook 1 is the original one, workbook 2 is an update of workbook 1 in which a number of product_id's are deleted. I want to know which product_id's are deleted and no longer available. Based upon that result I can set the status of a product to 0 (not available) or 1 (available) in (for example) a third column "status".

    Can somebody help me out?

    Thx!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Compare two workbooks

    Assuming you want to test WB 1 against WB2 and have the results shown in WB1, use this, copied down - adjust ranges as needed...
    =IFERROR(VLOOKUP(B2,'[workbook 2.xls]Sheet'!B$2:B$27,1,FALSE),"Unavalable")

    if you want it the other way, change the file name
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-06-2013
    Location
    Brussels, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare two workbooks

    This doesn't seem to work: I get the same result ("unavailable") in all cells.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Compare two workbooks

    it worked fine for me. take a look at the attached...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-06-2013
    Location
    Brussels, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Compare two workbooks

    My bad! Selected both column A & B as matrix in the VLOOKUP ...

+ 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