+ Reply to Thread
Results 1 to 6 of 6

index to find duplicate names

  1. #1
    Registered User
    Join Date
    01-06-2010
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    53

    index to find duplicate names

    How can I use the index feature to search column A for duplicates and return results of each row in column B from each cell in Column C

    in this example Column A is where the duplicates are
    and each item in the column must be unique so column B will be the unique names.
    Column C is a group ID so each item in A can be a member of two groups in column C
    So B will be used to create a new unique name with the group ID next to the name.

    B1:B12 needs to do some thing like
    =INDEX($A$1:$A$12,SMALL(IF($A$1:$A$12=$C$1:$C$12,ROW($A$1:$A$12)),ROW(1:1))-1,3)

    I am just not sure how to do this

    X Column A Column B Column C
    1 Apple Apple, Red Red
    2 Orange Orange
    3 Banana Yellow
    4 Strawberry Red
    5 Cherry Cherry, Red Red
    6 Apple Apple, Green Green
    7 Lime Green
    8 Alvarado Green
    9 tomato Orange
    10 Cherry Cherry, Black Black
    11 Plum Purple
    Last edited by 2k05gt; 06-13-2014 at 08:38 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: index to find duplicate names

    I have no idea what you want here

    Looking at your sample, you include Orange (row 2), which appears in row 2 only, change Banana to Yellow, which appears nowhere else - likewise with strawberry/red???

    Best I can come up with is this, in D1, copied down...
    =IF(B2="",A2,SUBSTITUTE(B2,A2&", ",""))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    01-06-2010
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: index to find duplicate names

    Orange does not have another entry in column A

    think of the fruit like Buyers Names, if they only placed one order they would not have a duplicate order (Column A)
    if they placed another order they would have a duplicate name in A so I am trying to keep all the names unique
    so by adding the second order item to the Name makes it unique.

    I guess I just could make all the names in Column A unique in Column B. then it would be eaiser.

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: index to find duplicate names

    in D1:

    =IFERROR(INDEX($A$1:$A$11,SMALL(IF($A$1:$A$11=LEFT(B1,SEARCH(",",B1,1)-1),ROW($A$1:$A$11)-ROW($A$1)+1),COUNTIF($A$1:A1,A1))),"")

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: index to find duplicate names

    Doubled post

  6. #6
    Registered User
    Join Date
    01-06-2010
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: index to find duplicate names

    =IFERROR(INDEX($A$1:$A$11,SMALL(IF($A$1:$A$11=LEFT(B1,SEARCH(",",B1,1)-1),ROW($A$1:$A$11)-ROW($A$1)+1),COUNTIF($A$1:A1,A1))),"")

    It's not working
    Col A and Col C are the variables I am working with, Col B is the result

  7. #7
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,369

    Re: index to find duplicate names

    Maybe more clear if you give us the results that you after, and you have done unique ID in Column B, why you still need the formula in Column D to return Column B? Im confused..

  8. #8
    Registered User
    Join Date
    01-06-2010
    Location
    Washington, DC
    MS-Off Ver
    Excel 2010
    Posts
    53

    Re: index to find duplicate names

    I am sorry for the confusion, I don't need anything in "D" this may have been a mis-type on my part.

    A and C are the constants these are filled in by the database

    What I need is B filled in IF column A has a Duplicate Name

    with the row item in C

    in the Example above there are duplicate apples in A
    so B1 would then be "Apple" from A1 and "Red: from C1 (Apple, Red)
    and B6 would be "Apple" from A6 and "Green" from C6 (Apple, Green)
    the Next Duplicate is A5 "Cherry" so B5 would be (Cherry, Red)
    and "Cherry" from Row A10 would be B10 (Cherry, Black)
    Last edited by 2k05gt; 06-13-2014 at 08:40 AM.

+ 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. INDEX Match Duplicate names displayed problem.
    By Andrewman36 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2014, 11:00 PM
  2. Replies: 3
    Last Post: 01-07-2014, 08:29 PM
  3. Index, Match, Large Function returning duplicate names
    By RNeel55 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-08-2013, 04:09 PM
  4. Replies: 4
    Last Post: 03-04-2010, 11:53 AM
  5. Creating a macro to find duplicate names
    By Carter Devereaux in forum Excel General
    Replies: 1
    Last Post: 07-06-2005, 06:05 PM

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