+ Reply to Thread
Results 1 to 6 of 6

Compare two tables

  1. #1
    Registered User
    Join Date
    07-28-2014
    Location
    Velserbroek, Netherlands
    MS-Off Ver
    2010
    Posts
    14

    Compare two tables

    Hello,

    I have a problem with comparing two tables. The problem is as follows: I have two sheets in Excel, 1 with the the administration up until august and one with the administration up until september. What I want to do is compare these two sheets (per row not per cell) and generate a new sheet with the differences between the two. I have a program from Ablebits data to compare two tables but this program has one problem when comparing the tables. The problem is that if a certain row occurs two times in sheet 1 and one time in sheet 2 it deletes all 3 of the rows instead of leaving one in sheet 1.

    Please find attached a sheet as an example. In short I want to compare the two sheets and have 1 new sheets which shows me all the differences between the two (on a row level).

    Thanks in advance for your help.

    Marald
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Compare two tables

    Please see the attachment. The code can be run from the View - macros button.

    I've taken the approach of creating arrays for the two sheets which contain delimited concatenations of the rows. These are then compared and matches indicated by a flag within the array to deal with the multiple row problem. There is a sheet for additions and one for removals.

    Code

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Martin

  3. #3
    Registered User
    Join Date
    07-28-2014
    Location
    Velserbroek, Netherlands
    MS-Off Ver
    2010
    Posts
    14

    Smile Re: Compare two tables

    Thank you very much!! This was exactly what I was looking for!

  4. #4
    Registered User
    Join Date
    07-28-2014
    Location
    Velserbroek, Netherlands
    MS-Off Ver
    2010
    Posts
    14

    Re: Compare two tables

    Hello,

    Just another question, when I use the macro provided before it gives me a few errors (please see attached file). Could someone help me with resolving these issues. For one Excel takes EUR 192,144 and turnes it into 192.144,00. I understand that it has something to do with the US/EUR way of using point and commas in numbers but switching my excel from EUR to US does not resolve the problem. Thansk in advance for your help.

    Kind regards,

    MaraldExample 2.xlsm

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Compare two tables

    Can you try formatting the column in the additions sheet in EUR before running the code?

  6. #6
    Registered User
    Join Date
    07-28-2014
    Location
    Velserbroek, Netherlands
    MS-Off Ver
    2010
    Posts
    14

    Re: Compare two tables

    Thanks for your quick reply! I have tried convert the cells to Euros but this does not work. Any other tips?

+ 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 between 2 tables
    By dispro14 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2014, 03:38 AM
  2. [SOLVED] Compare tables in Excel
    By sandra_222 in forum Excel General
    Replies: 11
    Last Post: 09-19-2012, 04:27 AM
  3. compare two tables
    By ekoot in forum Excel General
    Replies: 2
    Last Post: 02-08-2010, 07:44 AM
  4. How to compare tables.
    By tompogo in forum Excel General
    Replies: 7
    Last Post: 01-11-2010, 03:52 PM
  5. need to compare between 2 tables
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-24-2006, 06:45 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