+ Reply to Thread
Results 1 to 7 of 7

Compare the 1st 9 digits in two columns looking for duplicates

  1. #1
    Registered User
    Join Date
    05-17-2016
    Location
    india
    MS-Off Ver
    2013
    Posts
    9

    Exclamation Compare the 1st 9 digits in two columns looking for duplicates

    I had to compare 1st 9 digits in two columns of data to find duplicates within data , i found this thread,

    " http://www.excelforum.com/excel-form...uplicates.html "

    i used the same data used in the above thread to get similar answer

    data :
    A B
    22345678922223200 12345678922223200
    32345678922223200 12345678922223200
    42345678922223200 22345678922223200
    12345678922223200 12345678922223200
    12345678922223200 12345678922223200
    24345678922223200 12345678922223200

    using formulas
    =COUNTIF($B$1:$B$50,LEFT(A1,9)&"*")>0
    =COUNTIF($B$1:$B$50,LEFT(A1&" ",9)&"*")>0
    =COUNTIF(B$1:B$100,LEFT(A1,9)&"*")>0

    all the three aren't working for me (i'm using office 2013)

    help me!!


    22345678922223200 12345678922223200 =COUNTIF($B$1:$B$50,LEFT(A1,9)&"*")>0
    32345678922223200 12345678922223200 =COUNTIF($B$1:$B$50,LEFT(A2,9)&"*")>0
    42345678922223200 22345678922223200 =COUNTIF($B$1:$B$50,LEFT(A3,9)&"*")>0
    12345678922223200 12345678922223200 =COUNTIF($B$1:$B$50,LEFT(A4,9)&"*")>0
    12345678922223200 12345678922223200 =COUNTIF($B$1:$B$50,LEFT(A5,9)&"*")>0
    24345678922223200 12345678922223200 =COUNTIF($B$1:$B$50,LEFT(A6,9)&"*")>0

    returns

    22345678922223200 12345678922223200 FALSE
    32345678922223200 12345678922223200 FALSE
    42345678922223200 22345678922223200 FALSE
    12345678922223200 12345678922223200 FALSE
    12345678922223200 12345678922223200 FALSE
    24345678922223200 12345678922223200 FALSE

    it supposed to return

    TRUE
    FALSE
    FALSE
    TRUE
    TRUE
    FALSE

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,901

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    Perhaps something like:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Anything that is 0 = FALSE and anything greater than 0 is TRUE

    You could change it to:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BSB
    Last edited by BadlySpelledBuoy; 05-18-2016 at 07:00 AM.

  3. #3
    Registered User
    Join Date
    05-17-2016
    Location
    india
    MS-Off Ver
    2013
    Posts
    9

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    Screenshot (46).png

    Screenshot (45).png

  4. #4
    Registered User
    Join Date
    05-17-2016
    Location
    india
    MS-Off Ver
    2013
    Posts
    9

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    oww,, works,, thank you so much BadlySpelledBuoy

  5. #5
    Registered User
    Join Date
    05-17-2016
    Location
    india
    MS-Off Ver
    2013
    Posts
    9

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    it works thank you for quick reply

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,901

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    Happy to help. Thanks for the rep point.

    Don't forget to mark the thread as SOLVED if you're happy you have a working solution.

    BSB

  7. #7
    Registered User
    Join Date
    05-17-2016
    Location
    india
    MS-Off Ver
    2013
    Posts
    9

    Re: Compare the 1st 9 digits in two columns looking for duplicates

    =IF(SUMPRODUCT(--(LEFT(B1:B50,9)=LEFT(A1,9)))=0,FALSE,TRUE)

    This one suits better thanks again

+ 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] Compare the 1st 9 digits in two columns looking for duplicates
    By Sweetetc in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-18-2016, 06:19 AM
  2. Compare three columns for duplicates
    By Daniellowitz in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-09-2015, 08:17 AM
  3. Compare 2 columns and sum frequency of duplicates
    By jntslvdrt in forum Excel General
    Replies: 8
    Last Post: 03-24-2015, 01:49 PM
  4. Compare 2 columns and remove duplicates in both columns when found
    By 1dtms in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2013, 02:19 AM
  5. Compare columns and delete duplicates
    By ephrahim in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-24-2013, 03:38 PM
  6. [SOLVED] Macro to Compare Columns A & B and dispaly any duplicates in Columns C & D
    By robertguy in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-12-2013, 02:24 AM
  7. Compare 2 columns and mark the duplicates
    By powpowninjastar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-12-2010, 10:06 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