+ Reply to Thread
Results 1 to 6 of 6

checking the differences in two different sheets

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

    checking the differences in two different sheets

    hi, i was asked to develop a code that will check the two sheets in column D for name and compare the contents on column W and records whats different in column AF.

    they are almost same sheets but sometimes rows are inserted.

    is there way to develop a code that will check the difference even though new rows are inserted? - new rows maybe can be recorded on column AF as "new row" or whatever

    because, if we can check the same name, script might be able to detect the rows inserted

    and not giving the full differences when row is inserted.

    this is the code that i have but it does not have detect the rows inserted, it just purely detects the differences.

    i never did VBA i am starting to learn and this code is from someone else as well..

    Thank you in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,873

    Re: checking the differences in two different sheets

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

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

    Re: checking the differences in two different sheets

    Here is the test file that includes the data and code sorry for missing attachment!
    Attached Files Attached Files

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

    Re: checking the differences in two different sheets

    It may help if you could include expected results. At present there is nothing in either column W nor AF. If we could see what you expect especially in cells W8, W9, AF8 and AF9 we may be able to provide more help.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

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

    Re: checking the differences in two different sheets

    Ah, I am sorry that i was not being clear, i was expecting that, code will compare both worksheets (cell by cell) and produce whats different in worksheet1-column AF.

    For example, worksheet1 A5 is empty and worksheet2 A5 is not empty, so then code will write, "ws1 says - (no message necessary for empty cell) , ws2 says - blahblah".

    Especially with inserted row (Row8), i want the code to write "Row inserted" in cell AF8. Then continuing next rows checking differences.

    The reason I wanted the code to record difference on AF column was that, other people will comment on each rows from column G to either AB or AD ~ish so i wanted to make some enough room, about 25 columns will be more than enough rooms for others to fill.

    I also added another excel file that has some my expected result (added what i want the code to do if i ran it.)

    Thank you for asking me to clarify
    Attached Files Attached Files
    Last edited by leewk114; 11-07-2019 at 04:26 AM. Reason: clarifying my question

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

    Re: checking the differences in two different sheets

    Not exactly what you asked for however perhaps it will be helpful.
    Columns AF:AK check for differences using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column AL displays new row if there are 6 differences (which seems to only occur if a new row was added) using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files

+ 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. How to find differences between two sheets?
    By maknu in forum Excel General
    Replies: 4
    Last Post: 05-13-2019, 08:52 AM
  2. Compare two sheets and get all differences
    By KingTamo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-14-2019, 11:02 PM
  3. Checking for differences between cells in two columns
    By edward.b in forum Excel General
    Replies: 1
    Last Post: 01-11-2011, 05:51 AM
  4. Calculating differences between two sheets
    By CanadianGSX in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-25-2010, 12:01 PM
  5. checking two lots of data for any differences
    By 3smees23 in forum Excel General
    Replies: 3
    Last Post: 06-04-2009, 05:59 AM
  6. Checking for differences
    By james_tang in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-27-2007, 10:12 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