+ Reply to Thread
Results 1 to 14 of 14

Extract Duplicate & Missing Hard Names from 2 tables

  1. #1
    Registered User
    Join Date
    02-04-2021
    Location
    Kerbala , Iraq
    MS-Off Ver
    2019
    Posts
    15

    Exclamation Extract Duplicate & Missing Hard Names from 2 tables

    Hello guys,
    I need a formula in excel to compare between 2 columns to find Duplicate & Missing Names and do the following
    1-put the Duplicate names in Table 1 & 2 in new column called Duplicate Names
    2-put the Unique names that exists in Table 1 and not exists in Table 2 in column called Unique Names In Table 1
    3-put the Unique names that exists in Table 2 and not exists in Table 1 in column called Unique Names In Table 2

    Note : I tried conditional format to highlight the duplicate & Unique names, But it did not success to find all Duplicate names also tried different equations
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,463

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Try in E3:
    Please Login or Register  to view this content.
    D3:
    Please Login or Register  to view this content.
    C3:
    Please Login or Register  to view this content.
    All are:
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    They might cause your PC slow down abit due to array formula. Just waiting for the calculating finished.
    Attached Files Attached Files
    Quang PT

  3. #3
    Registered User
    Join Date
    02-04-2021
    Location
    Kerbala , Iraq
    MS-Off Ver
    2019
    Posts
    15

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Quote Originally Posted by bebo021999 View Post
    Try in E3:
    Please Login or Register  to view this content.
    D3:
    Please Login or Register  to view this content.
    C3:
    Please Login or Register  to view this content.
    All are:
    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).

    They might cause your PC slow down abit due to array formula. Just waiting for the calculating finished.
    Thanks for replay, but still not working
    in column C it suppose to extract over 790 duplicate names but nothing with this formula

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Please don't quote whole posts -- it's just clutter.*If you are responding to a post out of sequence, limit quoted content to a few relevant lines that makes clear to whom and what you are responding

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    I think the formula in C3 should be:

    =IFERROR(IFERROR(INDEX($A$3:$A$791,MATCH(0,IF(COUNTIF($A$3:$A$791,$B$3:$B$997)>1,COUNTIF($C$2:C2,$A$3:$A$791),""),0)),INDEX($B$3:$B$997,MATCH(0,IF(COUNTIF($B$3:$B$997,$A$3:$A$791)>1,COUNTIF($C$2:C2,$B$3:$B$997),""),0))),"")

    I tried this, found some duplicates but my computer "stopped" as this formula is very resource-hungry! Nearly 2 million comparisons!

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,996

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    C2, copied down:
    =IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($A$3:$A$1000)/ISNUMBER(MATCH($A$3:$A$1000,$B$3:$B$1000,0)),ROWS(C$2:C2))),"")

    D2, copied across and down:
    =IFERROR(INDEX(A:A,SMALL(IF(ISNA(MATCH($A$2:$A$1000,$B$2:$B$10000,0)),ROW($A$2:$A$1000)),ROWS(D$1:D1))),"")

    These are ordinary formulae.... just ENTER. It takes a few (<5) seconds to calculate, so be patient!!
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    @Glenn
    You must have a turbo-charged m/c as mine virtual stopped using your AGGREGATE formula. I had the old "Calculating (4 processors) x%" message - time for cofffee!

    Using VBA, results was "instanteous" !

    Be interested to know the results you got so I can check my VBA results.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,996

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    It's a battered old 1Tb HP Pavilion 14" laptop (bought for about £300 in August 2015). It's been around the world a few times with Duct tape holding the casing together...

    It bears the scars of an active life.... so not supercharged...

  9. #9
    Registered User
    Join Date
    02-04-2021
    Location
    Kerbala , Iraq
    MS-Off Ver
    2019
    Posts
    15

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Thanks But still some duplicated names did not appear in column C
    I think if you notice there are difference in names lengths between two column a & b
    If you could write a formula to compare fixed equal names length between two column a & b to extract full duplicated name
    Please if you could help me with this issue

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,996

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Who are you talking to?

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    This is a VBA compare using your data
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-04-2021
    Location
    Kerbala , Iraq
    MS-Off Ver
    2019
    Posts
    15

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    to you Mr Glenn
    Sorry I miss to mention to you
    Last edited by tgh12; 04-02-2021 at 12:33 PM. Reason: add new text

  13. #13
    Registered User
    Join Date
    02-04-2021
    Location
    Kerbala , Iraq
    MS-Off Ver
    2019
    Posts
    15

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    Sorry there is still duplicated names in Column D & E
    if you notice original Table 1 number of cell is 789 and Table 2 is 992
    all 789 is duplicated in both tables, the difference name must be in maximum 203

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

    Re: Extract Duplicate & Missing Hard Names from 2 tables

    As you are using the 2019 version of Excel, power query might be a possible solution.
    In the attached file columns A and B are converted to tables.
    Column C is the list of Names in Both Tables which is populated by merging Table1 and Table2 using "Inner (only matching rows)"
    Column D is the list of Unique Names in Table 1 which is populated by merging Tabe1 and Table2 using "Left Anti (rows only in first)"
    Column E is the list of Unique Names in Table 2 which is populated by merging Tabe2 and Table1 using "Left Anti (rows only in first)"
    Note that in the last merge Table2 is listed first.
    Let us know if you have any questions.
    Last edited by JeteMc; 04-08-2021 at 02:31 PM. Reason: Added File
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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] extract one of the duplicate names in the table below
    By sami204098 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-01-2018, 05:49 AM
  2. Strange Add-In Problem (Hard to Duplicate)
    By blackscholes in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-28-2014, 08:12 AM
  3. Please Help. Its hard for me to distribute names manually and Need this automated.
    By mikaelkian in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-16-2014, 01:14 AM
  4. Really hard challenge !! How to standardize Capital letters on names
    By EwenBlake in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-19-2013, 06:01 AM
  5. extract serial number to Hard disc
    By thair in forum Excel General
    Replies: 5
    Last Post: 10-31-2012, 09:23 AM
  6. Code List Tables - missing the Linked Tables
    By RxMiller in forum Access Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2009, 01:13 PM
  7. Can you instantiate classes without hard-coding class names??
    By ALittle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2005, 09:59 PM

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