+ Reply to Thread
Results 1 to 3 of 3

comparing two sheets and record changes

  1. #1
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    comparing two sheets and record changes

    Hi, I am trying to run a script that will compare two different sheets and write changes on same row, different column.

    i.e script will detect contents in sheet1 A5 and sheet2 A5 are different then script will type "old one says ~~, new one says ~~" on column F row 5

    This is what I got so far, I did get some help but I wasn't sure how to ellaboard the last "if not" part

    Please Login or Register  to view this content.
    In attachment, there is one file with the script (one that brings the excel files and one that has the script that I am trying to figure out), and there is one sample file to compare
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: comparing two sheets and record changes

    Hi there,

    See if the attached version of your workbook does what you need. It uses the following code:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.

    The code is a bit more efficient than the code you posted because it compares only those rows/columns which contain data values. It will also cope with two worksheets which have different numbers of rows/columns which contain data values.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-06-2019
    Location
    sacramento
    MS-Off Ver
    365
    Posts
    21

    Re: comparing two sheets and record changes

    Hi Thank you very much for your help it works great and super fast!

    now i am also trying to change those code little bit so it can detect when rows are added also

    do you have any idea on that?

+ 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. Sports Record Keeping Project: Turning weekly scores into full record sheets
    By oneidasfinest1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-31-2015, 09:26 PM
  2. Replies: 12
    Last Post: 04-08-2014, 01:02 AM
  3. Replies: 1
    Last Post: 11-16-2012, 09:25 AM
  4. Command Buttons for Viewing Record, Next Record and Previous Record
    By david1987 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-23-2012, 06:30 AM
  5. Comparing several rows of data for 1 record
    By Stewpot in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-14-2008, 08:08 PM
  6. [SOLVED] Comparing Record In Two Recordset
    By Ritesh in forum Excel General
    Replies: 1
    Last Post: 08-06-2006, 05:35 PM
  7. Comparing sql record to cell value
    By mozart in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-07-2005, 08:19 AM

Tags for this Thread

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