+ Reply to Thread
Results 1 to 3 of 3

Compare between 2 tables

  1. #1
    Registered User
    Join Date
    06-19-2014
    Location
    Israel
    MS-Off Ver
    2010
    Posts
    16

    Post Compare between 2 tables

    Hi,
    I would like to get some help with a macro that compare between 2 tables in 2 different sheets - BOM (Bill Of Materials) compare
    And Creat a Table with all differences.

    Table 1 (sheet1):

    PartNum QTY Location
    000 2 A1
    111 3 B1
    222 1 C1
    333 4 D1

    Table 2 (sheet2):

    PartNum QTY Location
    333 3 D1
    000 2 A1
    111 3 B2
    222 1 C1
    444 5 E6

    Table with all differences (sheet 3):

    PartNum (Ver1) PartNum (ver2) QTY (Ver1) QTY (Ver2) Location (Ver1) Location (Ver2)
    111 111 3 3 B1 B2
    333 333 3 4 D1 D1
    Blank 444 Blank 5 Blank E6

  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 between 2 tables

    Hi,

    The general method for comparing whether one list appears in another is to use a MATCH() function. Maybe wrapping it in an IFERROR for tidiness i.e. in general

    =IFERROR(MATCH(A1,another_range,False),"No Match")

    You can the filter the list for the No Match items.
    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
    06-19-2014
    Location
    Israel
    MS-Off Ver
    2010
    Posts
    16

    Re: Compare between 2 tables

    Hi Richard,
    The problem is that the same PartNum can appear in more then one row but for different locations.
    Also row 2 in sheet 1 can appear in other row in sheet 2.

    Thanks

+ 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 two tables with a formula
    By tal_a in forum Excel General
    Replies: 2
    Last Post: 07-11-2010, 11:14 AM
  2. compare two tables
    By ekoot in forum Excel General
    Replies: 2
    Last Post: 02-08-2010, 07:44 AM
  3. How to compare tables.
    By tompogo in forum Excel General
    Replies: 7
    Last Post: 01-11-2010, 03:52 PM
  4. Excel 2007 : How to compare data in two tables?
    By learner6 in forum Excel General
    Replies: 4
    Last Post: 04-05-2009, 12:59 AM
  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