+ Reply to Thread
Results 1 to 8 of 8

VBA: Remove duplicate data in excel cell

  1. #1
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    VBA: Remove duplicate data in excel cell

    How to remove duplicate data (separated by semicolon) in the excel cell if found in Sheet1?

  2. #2
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: VBA: Remove duplicate data in excel cell

    Could you post some examples?

  3. #3
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: VBA: Remove duplicate data in excel cell

    Your description leaves out some details that would help to know; however, let's start with this and see how close it comes to what you want. With Sheet1 active, run this macro (change the red highlighted range to the actual range of cells you want to process)...
    Please Login or Register  to view this content.
    Last edited by Rick Rothstein; 10-07-2019 at 10:31 PM.

  4. #4
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    Re: VBA: Remove duplicate data in excel cell

    Thanks, Rick it worked but if there is space between semicolon then the code does not work.

  5. #5
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: VBA: Remove duplicate data in excel cell

    Quote Originally Posted by vikim View Post
    Thanks, Rick it worked but if there is space between semicolon then the code does not work.
    Saying it doesn't work gives us no clue what happened that you did not want (did the code error out? did it post wrong results? something else?). Let me take a guess... does this fix your problem (if not, provide more details)...
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    Re: VBA: Remove duplicate data in excel cell

    Thanks it worked. But in some cells there are double semicolon, in some cells cell data started with a semicolon or ended with a semicolon. And in some cells there is only one semicolon.

  7. #7
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,410

    Re: VBA: Remove duplicate data in excel cell

    Does this modification of my code do what you want...
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    12-27-2018
    Location
    London, England
    MS-Off Ver
    2007, 2010
    Posts
    39

    Re: VBA: Remove duplicate data in excel cell

    Thanks a million.

+ 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. Remove duplicate rows in Excel, merge data in other columns
    By AndreaJean18 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-13-2017, 08:12 PM
  2. AutoMerge (Remove duplicate Data) outside of Excel?
    By NewYears1978 in forum Excel General
    Replies: 4
    Last Post: 06-10-2016, 04:27 PM
  3. How we can remove duplicate data from excel sheet
    By intouch01 in forum Excel General
    Replies: 3
    Last Post: 09-05-2015, 07:46 AM
  4. Replies: 1
    Last Post: 08-31-2015, 05:21 AM
  5. [SOLVED] Append Data in Excel and remove duplicate records - Macro
    By socrates1911 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-20-2013, 06:01 PM
  6. Remove duplicate data in single cell
    By GenericPat in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2012, 12:32 PM
  7. Is there a macro to identify and remove duplicate data in Excel?
    By Cindy Lou in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-08-2006, 11:15 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