+ Reply to Thread
Results 1 to 7 of 7

Remove duplicates in a single cell

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Remove duplicates in a single cell

    I have about a 1000 names arranged in column A. My problem is however, each name appears twice, for example:

    Cell 1 = Adam SparksAdam Sparks
    Cell 2 = Ging FreecssGing Freecss
    Cell 3 = Steve PetersonSteve Peterson
    and so on

    I want the name to appear just once. Please help.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,667

    Re: Remove duplicates in a single cell

    Using formula or VBA code?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    02-27-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Remove duplicates in a single cell

    Quote Originally Posted by :) Sixthsense :) View Post
    Using formula or VBA code?
    I'd prefer using a Macro, but basically anything that does the job will do.

    To add to the complication, I tried working around this using the Text to Column feature but there are people with second names and third names as well. If I use a few filters I just might be able to do this.

    For example:

    Thomas PetersonThomas Peterson
    Thomas Jeffery PetersonThomas Jeffery Peterson
    Maureen Man Lai LeungMaureen Man Lai Leung
    and so on.

    Thanks

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Remove duplicates in a single cell

    Maybe this, then Copy, Paste Special > Values.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or to be safe, allow for trailing spaces
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Marcol; 02-27-2013 at 04:49 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    02-27-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Remove duplicates in a single cell

    Quote Originally Posted by Marcol View Post
    Maybe this, then Copy, Paste Special > Values.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Or to be safe, allow for trailing spaces
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Thanks Marcol! The first formula worked like a charm! Do you mind explaining it? I'm new to all of this but I'm really into programming and I need to learn how to think like that.

    Thanks for the help, you're a life saver!

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Remove duplicates in a single cell

    Not a lot to explain, you know the string is twice as long as you need, so, starting on the left, you need to return half of the string, LEN(A1)/2.
    You could equally use RIGHT(), to return the second half. In your case it is the same as the first half.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    This isn't programming, it's native formula.

    Excels' programming language is VBa. Code for this might look like this.
    In a standard module.
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-27-2013
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Remove duplicates in a single cell

    Thanks Marcol.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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