+ Reply to Thread
Results 1 to 11 of 11

Remove Duplicate Words from a Cell

  1. #1
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Remove Duplicate Words from a Cell

    I need to remove duplicate words within a cell. I know how to remove duplicate cells, but I can't figure out how to remove duplicate words inside a cell.

    Example: Excel Forum is is so awesome! ---> Excel Forum is so awesome!

    Thanks
    Attached Files Attached Files
    Last edited by Ocean Zhang; 10-20-2014 at 08:21 PM.

  2. #2
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Remove Duplicate Words from a Cell

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  3. #3
    Forum Contributor
    Join Date
    05-29-2009
    Location
    Chattanooga, TN
    MS-Off Ver
    2021
    Posts
    205

    Re: Remove Duplicate Words from a Cell

    edited to add example file. column A is the original data. Column B would be my desired output.

    thanks

  4. #4
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Cool Re: Remove Duplicate Words from a Cell

    Here is my way...
    uses some helper columns
    have a look..!



    Edit :- I personally feel SKTNEER solution is perfect for this one.. Short and quick...
    Attached Files Attached Files
    Last edited by Vikas_Gautam; 10-21-2014 at 11:36 AM.
    Regards,
    Vikas Gautam
    Excel-buzz.blogspot.com

    Excel is not a matter of Experience, its a matter of Application.

    Say Thanks, Click * Add Reputation

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Remove Duplicate Words from a Cell

    If you are open to a VBA solution to achieve this, please follow these steps......

    Open your workbook --> Press Alt + F11 to open VBA Editor --> On VBA editor's window --> Insert --> Module --> Paste the code given below (a user defined function) in the opened code window --> Close VBA Editor --> Save your workbook as Excel Macro-Enabled Workbook.
    The code is as follows......
    Please Login or Register  to view this content.
    Now on your sheet, use this UDF like this......

    A B C
    1 Original Data Desired output
    2 Excel forum is is so awesome! Excel forum is so awesome! =RemoveDupWords(A2)
    3 Please help please me with this formula Please help me with this formula

    The formula used in B2 is as follows...
    In B2
    Please Login or Register  to view this content.
    and copy down.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Remove Duplicate Words from a Cell

    @sktneer

    Nice one! Even if the duplicate word isn't the first one, this works perfectly.

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Remove Duplicate Words from a Cell

    Thanks Ron for the appreciation and liking the solution.

  8. #8
    Registered User
    Join Date
    09-19-2018
    Location
    Spain
    MS-Off Ver
    2016
    Posts
    1

    Re: Remove Duplicate Words from a Cell

    very helpful, thanks.

  9. #9
    Registered User
    Join Date
    12-21-2022
    Location
    California
    MS-Off Ver
    365
    Posts
    2

    Re: Remove Duplicate Words from a Cell

    Hello Sktneer,

    This function looks like exactly what I need but for some reason I keep getting #NAME? when I try to execute it. I know I even took your example verbatim.
    Attachment 810300

    Here is the function that I copied
    Please Login or Register  to view this content.
    Thank you very much for any help at all, it is greatly appreciated
    Last edited by FlameRetired; 12-22-2022 at 12:55 AM.

  10. #10
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Remove Duplicate Words from a Cell

    john-i welcome to the forum.

    This thread is over 8 years old. It is doubtful that the original contributors are any longer following it.

    Also please review our rules. There aren't many of them and they are reasonably straight forward.

    Rule 04: Hijacking (Please start your own thread. If you feel a particular thread is relevant to your question refer to it in your thread.)
    and
    Rule 02: Missing Code Tags (Since you are new I will insert the code tags for you this time.)

    Thank you ahead of time and welcome to the forum again.
    Dave

  11. #11
    Registered User
    Join Date
    12-21-2022
    Location
    California
    MS-Off Ver
    365
    Posts
    2

    Re: Remove Duplicate Words from a Cell

    Thank you very much Dave, I do appreciate it.

+ 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. Formula to remove duplicate words
    By ConfusedaboutVBA in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-20-2013, 10:06 PM
  2. Remove duplicate WORDS from within cells
    By smuglovsky in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2013, 06:14 PM
  3. Replies: 3
    Last Post: 11-28-2012, 04:00 AM
  4. Replies: 10
    Last Post: 04-10-2012, 06:37 PM
  5. Remove duplicate words from two columns
    By liapisit in forum Excel General
    Replies: 13
    Last Post: 04-08-2010, 09:40 AM

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