+ Reply to Thread
Results 1 to 7 of 7

Deleting duplicated data from 1 cell.

  1. #1
    Registered User
    Join Date
    01-22-2010
    Location
    Tredegar, South Wales
    MS-Off Ver
    Excel 2007
    Posts
    1

    Deleting duplicated data from 1 cell.

    Hi,
    I am a new user to this site and also new user of excel. I need help to search individual cells that contains multiple strings of data, and then delete the duplicated data contained in that cell. Is this possible?

    Many Thanks

    Ben

    This below shows what data would be contained in 1 cell.

    CN2233, CN2233, CN2134, CN2266, CN2233, CN2136, CN2266

    And this would ideally be the result after the process/formula/macro

    CN2233, CN2134, CN2266, CN2136

    so the duplicated data would be deleted.

  2. #2
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: Deleting duplicated data from 1 cell.

    Is it essential that you keep this data in the one cell? Is it possible to parse the data into multiple cells? of course everything is possible, but let's first ensure that what you are asking for is what you actually need.

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Deleting duplicated data from 1 cell.

    try..
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Deleting duplicated data from 1 cell.

    this is better it gets ride of the trailing ,
    Please Login or Register  to view this content.
    Last edited by pike; 01-22-2010 at 10:31 PM. Reason: add clearcontents

  5. #5
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Deleting duplicated data from 1 cell.

    Ben Lewis,

    See the attached workbook "Array - Deleting duplicate data from a cell - Ben Lewis - SDGD12.xlsm" with macro "RemoveStringDups".

    Detach the workbook and run the "RemoveStringDups" macro.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  6. #6
    Forum Expert
    Join Date
    01-03-2006
    Location
    Waikato, New Zealand
    MS-Off Ver
    2010 @ work & 2007 @ home
    Posts
    2,243

    Re: Deleting duplicated data from 1 cell.

    hi all,

    Here's another variant which is similar to Pike's & Stanley's - I tried to post last night but had connection issues.
    It works on the current selection (no error checking for selection type though) & uses Join after working through the elements of the array. I have tried to make it work for non-contiguous ranges as well by looping through the selected areas. It is based on some of Jindon's code that I picked up some time ago.
    Potentially, it (or the others) could be made faster by creating in memory arrays based on the range, processing the strings, & then writing them back to the sheet in one hit (instead of one cell at a time). This would become more significant as the selection size increases.

    Please Login or Register  to view this content.

    hth
    Rob
    Rob Brockett
    Kiwi in the UK
    Always learning & the best way to learn is to experience...

  7. #7
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Deleting duplicated data from 1 cell.

    hi Ben Lewis
    or with the more adaptable dictionary
    Please Login or Register  to view this content.

+ 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