Results 1 to 8 of 8

Need help with VB Macro to compare 2 worksheets

Threaded View

  1. #1
    Registered User
    Join Date
    03-24-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    21

    Exclamation Need help with VB Macro to compare 2 worksheets

    Experts,

    Attached is an excel document that contains 2 worksheets named "Structure_DATA" and "XML_DATA". The requirement is that I have to compare data in these 2 worksheets and report the differences in a new worksheet (of same workbook) named "Structure_XML_Comparison".

    If you look at the Structure_DATA and XML_DATA worksheets, the columns are common ( 5 in number), but the data in the rows are not the same. Here, "Name" column is the primary key to compare. I need a macro to do the following:
    1. If the data in the "Name" column of XML_DATA worksheet does not exist in the Structure_DATA worksheet, get that specific row(s) from XML_DATA and report it as "Added_Items" in the comparison sheet (on the XML_DATA - Right hand side). Refer to the format in the attached excel doc.
    2. If the data in the "Name" column of Structure_DATA worksheet does not exist in the XML_DATA worksheet, get that specific row(s) from Structure_DATA and report it as "Removed_Items" in the comparison sheet (on the Structure_DATA- Left hand side).
    3. If the data in all the columns of both the worksheets is exactly same, then report it as "Unchanged_Items". Show the matched rows on both Left and Right hand sides.
    4. If the data is different in any of the columns of both the worksheets, then the specific value which is different needs to be highlighted in red on both sides. All the modified or updated rows, should be reported under "Modified_Items"

    I am not comfortable with the Macros, so will need help from the experts to get the macro logic for the above. Appreciate your help in advance.
    Attached Files Attached Files
    Last edited by kalyanr12; 05-05-2014 at 12:22 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] COMPARE worksheets using MACRO!!!!
    By Deepa12 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-08-2012, 10:43 PM
  2. Macro to Compare the first column of two different worksheets.
    By BLN355 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2010, 06:20 PM
  3. Macro to compare data in 2 different worksheets
    By spshanth in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-21-2009, 08:24 AM
  4. Macro to compare data between worksheets
    By masterp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2007, 04:34 AM
  5. Macro to Compare Two Worksheets?
    By V. Hatherley in forum Excel General
    Replies: 2
    Last Post: 08-12-2006, 09:40 PM

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