+ Reply to Thread
Results 1 to 5 of 5

Compare two sheets for rows added, deleted, modified and no data change

  1. #1
    Registered User
    Join Date
    05-11-2018
    Location
    Bangalore
    MS-Off Ver
    Office 2013
    Posts
    2

    Post Compare two sheets for rows added, deleted, modified and no data change

    Hi Guys,

    Can anyone help me with the macro to compare two sheets which will give me below 4 results

    New Row added
    Row deleted
    Row modified
    Row is same as previous sheet

    I tried recording macro using vlookup and sha1 hash; however it won't give me results based on deleted and newly added rows.

    Any help regarding this is greatly appreciated.

    Thank you

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Compare two sheets for rows added, deleted, modified and no data change

    Hello Prathamesh1991 and Welcome to Excel Forum.
    If I understand correctly then perhaps this will help.
    Sheets 1 and 2, columns A:D contain raw data.
    Column F on those sheets contain concatenated data for each row using: =A1&B1&C1&D1
    Column A on sheet 3 compares the values in column F of the two sheets using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If this doesn't meet your needs I would suggest uploading a desensitized sample of your workbook by clicking on the GO ADVANCED button below the Quick Reply window and then scrolling down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    05-11-2018
    Location
    Bangalore
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Compare two sheets for rows added, deleted, modified and no data change

    Hello JeteMc,

    Thank you so much for your help. This is what exactly I required; however, is it possible to incorporate this in a macro ? Also is it a possible that the current formula will not work if number of columns are high and character length of cell also greater than 250? like Vlookup ?.

    Also can you please guide me to write a code to concat all the columns dynamically?

    Thank you so much for your help and support . Greatly appreciated.

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,563

    Re: Compare two sheets for rows added, deleted, modified and no data change

    I am VBA illiterate, so I will not be able to write a macro or code to concatenate all columns dynamically. I will see if someone from the VBA side can work on this, however in the mean time I suggest that you upload a desensitized version of your actual spreadsheets so that they will have something to go on. To upload a sample workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.

  5. #5
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two sheets for rows added, deleted, modified and no data change

    A sample workbook would help us find a more precise solution, but the procedure below is a pretty straightforward copy of JeteMc's approach:

    Please Login or Register  to view this content.
    It should compare each row on sheet1 to the same row on sheet2 and report the results in column A of sheet 3. It should also dynamically account for any added rows or columns. Experiment a bit with the attachment to see if it's working as desired:
    Attached Files Attached Files
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compare 2 Excel Worksheets & Show Items Added, Removed & Modified
    By puls8 in forum Excel Programming / VBA / Macros
    Replies: 27
    Last Post: 11-13-2014, 02:02 AM
  2. Auto add date when data added/modified/deleted in cell.
    By serahkins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-25-2012, 08:11 AM
  3. Replies: 8
    Last Post: 02-27-2009, 07:38 AM
  4. compare and find added or deleted rows
    By helpwithXL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-10-2005, 02:55 PM
  5. [SOLVED] compare sheets for added or deleted rows
    By helpwithXL in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2005, 01:06 PM
  6. [SOLVED] how to detect added or deleted rows in compare
    By helpwithXL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2005, 09:06 AM

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