+ Reply to Thread
Results 1 to 4 of 4

Return cells(rows) that exist in 1 table but not the other ?

Hybrid View

  1. #1
    Registered User
    Join Date
    03-26-2014
    Location
    Toronto
    MS-Off Ver
    MS Excel for Office 365
    Posts
    31

    Return cells(rows) that exist in 1 table but not the other ?

    Good evening friends!

    I have a what may be simple-for-some-but-for-the-life-of-me-I-just-can't-figure-it-out situation and in need of your help!

    I have 2 sets of data in different sheets and I'd like to flag the differences between the two. I'd like to have the rows that exist in Data 2 but not in Data 1.

    Data 1 and Data 2 sheets hold the two data sets and the 3rd sheet holds the results I want.

    Even 1 tiny difference in any of the cells in a row should return the entire row.

    The attached is just a mock-up I wrote and the actual data sets will have thousands of rows and about 9 or 10 columns(if this matters).

    Thank you very much in advance!
    Attached Files Attached Files
    Last edited by zed369; 09-25-2018 at 10:25 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Return cells(rows) that exist in 1 table but not the other ?

    You could put this formula in F2 of Data_1 sheet, and copy it down to the bottom of your data:

    =A2&B2&C2&D2

    Put the same formula in F2 of Data_2 and copy that down. These formulae join the 4 fields of data into one cell. Then you can use this formula in cell G2:

    =IF(ISNA(MATCH(F2,'Data 1'!F:F,0)),MAX(G$1:G1)+1,"ok")

    Any numbers which occur down this column indicate those records which are not present in Data_1. Then you can use this formula in A2 of the Result sheet:

    =IFERROR(INDEX('Data 2'!A:A,MATCH(ROWS($1:1),'Data 2'!$G:$G,0)),"")

    Copy across to D2, then copy all 4 formulae down as far as you like (until you get blanks).

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-26-2014
    Location
    Toronto
    MS-Off Ver
    MS Excel for Office 365
    Posts
    31

    Re: Return cells(rows) that exist in 1 table but not the other ?

    This works! Thank you!

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Return cells(rows) that exist in 1 table but not the other ?

    You're welcome - thanks for the rep.

    Pete

+ 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] If Item on Sheet Doesn't Exist in Specified Table, Add It To Table
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2014, 12:39 PM
  2. [SOLVED] if value exist in colum return message..
    By bimo in forum Excel General
    Replies: 8
    Last Post: 04-24-2014, 01:37 PM
  3. Return indexes of rows when multiple rows of a table are selected.
    By samkumar in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 08-12-2013, 04:54 AM
  4. Find text in range of cells and add to table if it does not exist in range
    By dgadler1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-12-2013, 12:54 PM
  5. Vlookup return the header name of table (Table of 4 column x 55 rows)
    By sanpat in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-09-2013, 11:23 PM
  6. If a Value Doesn't Exist in a Table, Return ""
    By Ocean Zhang in forum Excel General
    Replies: 7
    Last Post: 06-23-2011, 04:13 PM
  7. Check If Files Exist and Return
    By Bluewhistler in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 02-08-2010, 08:37 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