Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can use a custom formula, using the regular expression component from
vbscript (it should be installed in your computer by default) Open the Visual Basic Editor (Alt+11), create a new module (menu Insert - Module) and paste the following: Function RemoveDup(str1) Dim regEx Set regEx = CreateObject("vbscript.regexp") regEx.Global = False regEx.Pattern = "\b(\w+)\b\s+\1" regEx.IgnoreCase = True RemoveDup = regEx.Replace(str1, "$1") End Function Then you can use this function in your workbook, just typing =RemoveDup(A1), for example. The formula will remove the first repeated word, for removing all repeated words change the line with regEx.Global = False to regEx.Global = True. Hope this helps, Miguel. "Laxman A Patil" wrote: How we can delete the duplicate word from a string from a particular cell in EXCEL |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract MS Excel Data embedded in MS Word | Excel Discussion (Misc queries) | |||
Possible Lookup Table | Excel Worksheet Functions | |||
How do I imbed a Word document into an Excel cell? | Excel Discussion (Misc queries) | |||
How to delete duplicate rows in Excel 2000? | Excel Discussion (Misc queries) | |||
Extract hyperlink string from excel cell | Links and Linking in Excel |