+ Reply to Thread
Results 1 to 2 of 2

Compare Sheet 1 and Sheet 2, and find matches and non-matches

Hybrid View

  1. #1
    Registered User
    Join Date
    03-30-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    5

    Compare Sheet 1 and Sheet 2, and find matches and non-matches

    Hi All,

    I have this query to be solved, hoping to find a solution. Appreciate any help.

    My query-

    I have 2 excel sheets in a workbook. Sheet1 and Sheet2. There are four columns of data in each sheet A,B,C and D. The code have to do the following:

    First, Copy Sheet1 into a new worksheet.(e.g. Sheet3)
    Next, program will run Sheet3 column A and match against Sheet2 Column A.
    For data that matches, Sheet3's Column E will be updated with Sheet2's Column D.
    Then, Sheet3's column F will be inserted with a formula to (C-D)
    Lastly, whatever that is not matched in Sheet2 and Sheet3 will be compiled in Sheet4.

    Is this possible?

    Regards,
    danNAD
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Compare Sheet 1 and Sheet 2, and find matches and non-matches

    I have 2 excel sheets in a workbook. Sheet1 and Sheet2. There are four columns of data in each sheet A,B,C and D. The code have to do the following:

    First, Copy Sheet1 into a new worksheet.(e.g. Sheet3)
    to copy the sheet right-click on the worksheet tab and select copy. when the dialog box comes up remember to tick "make a copy"

    Next, program will run Sheet3 column A and match against Sheet2 Column A.
    For data that matches, Sheet3's Column E will be updated with Sheet2's Column D.
    formula for sheet3 column E, assuming there are values in Column E already:
    Then in a blank column
    =if(Sheet3!A1=Sheet2!A1,Sheet2!D1,Sheet3!E1)

    Then copy the column and "Paste Special...Values into column E


    Then, Sheet3's column F will be inserted with a formula to (C-D)
    =C1-D1

    Lastly, whatever that is not matched in Sheet2 and Sheet3 will be compiled in Sheet4.
    I lost interest in trying to work out what you mean here


    click on the * Add Reputation if this was useful or entertaining.

+ 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