+ Reply to Thread
Results 1 to 7 of 7

compare old table with new table

  1. #1
    Registered User
    Join Date
    05-05-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    compare old table with new table

    Hi,
    I have two village tables (new ,Old) and each table have three columns region ,city and village ,I would like to compare the new with old
    to see if there is new village and to see if village changed from city to another city or changed from region to another region
    I attached the excel file



    Regards,
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: compare old table with new table

    See attached for one method which uses a couple of helper columns.

    Incidentally when uploading a sample please use real data, even if anonymised, that accurately represents the format of the actual data. i.e. typical string lengths, position of character spaces and other stuff which may be relevant to any analysis.

    All to often we find ourselves offering solutions to a trivial example which then doesn't work with the production data.
    Attached Files Attached Files
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-05-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Re: compare old table with new table

    Thanks Richard, The real data is very big 25000 records and it is not in English because of that I uploaded sample data.
    how I can specify the type of change for example " change city" or "change region" or "change region & city" ??


    Regards,

  4. #4
    Registered User
    Join Date
    05-05-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Re: compare old table with new table

    Thanks Richard, The real data is very big 25000 records and it is not in English because of that I uploaded sample data.
    how I can specify the type of change for example " change city" or "change region" or "change region & city" ??


    Regards,

  5. #5
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: compare old table with new table

    1) is this data

    k r g

    always related to

    k h g


    2) are there duplicated values in the old or new range.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  6. #6
    Registered User
    Join Date
    05-05-2016
    Location
    London
    MS-Off Ver
    2010
    Posts
    4

    Re: compare old table with new table

    1) k r g is related to k h g , that mean the village (k) is changed from city (h) to city (r)
    2) yes , there is duplicated data (a b c) is same in booth table

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: compare old table with new table

    Quote Originally Posted by GIS_DEVLOPER View Post
    Thanks Richard, The real data is very big 25000 records and it is not in English because of that I uploaded sample data.
    how I can specify the type of change for example " change city" or "change region" or "change region & city" ??


    Regards,
    Hi,

    The general principle is to decide exactly what you want to compare. Is it just a single field, e.g. village, or two or more fields.
    When you know what you want to compare create a helper column for each table that concatenates the fileds you want to compare into a single field.

    Then use an
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If this returns an error you know there is a difference.

    Wrap this formula in an
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    to show where there has been a change. Follow the example I gave you earlier.

+ 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. [SOLVED] table(A) as an array using all rows but only selected columns to compare with table(B)
    By se3unlock in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2015, 10:15 AM
  2. Inner Join with compare on 3rd table
    By tiger10012 in forum Access Tables & Databases
    Replies: 1
    Last Post: 06-23-2015, 02:29 PM
  3. Compare a table against rows and update if row not in the table.
    By brent_milne in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-12-2015, 02:32 PM
  4. Compare and Sort Two Different Table
    By lkurrt in forum Excel General
    Replies: 0
    Last Post: 02-19-2014, 01:10 PM
  5. Compare rows in access table
    By vijay2482 in forum Access Tables & Databases
    Replies: 5
    Last Post: 03-06-2013, 10:02 AM
  6. Compare to table
    By spxer in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-02-2006, 05:07 PM
  7. Compare two table
    By ray5_83 in forum Excel General
    Replies: 2
    Last Post: 12-22-2005, 09:12 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