Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Please how do I remove numbers from unformatted texts strings e.g
DEPOSIT RICA MARINE 6890312 RICA MARINE or DEPOSIT 7048783 KURUS NIG or DEPOSIT 7042248 NNAJI 7042248 NNAJI Pls I need a plobal formula for these |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
On Thu, 20 Mar 2008 04:04:00 -0700, adunao
wrote: Please how do I remove numbers from unformatted texts strings e.g DEPOSIT RICA MARINE 6890312 RICA MARINE or DEPOSIT 7048783 KURUS NIG or DEPOSIT 7042248 NNAJI 7042248 NNAJI Pls I need a plobal formula for these This UDF will remove all the digits from a text string, returning only the text portions. To enter this, <alt-F11 opens the VBEditor. Ensure your project is highlighted in the project explorer window, then Insert/Module and paste the code below into the window that opens. To use this, enter the formula =RemDigits(cell_ref) into some cell where cell_ref is your target cell (e.g. A1). ============================= Option Explicit Function RemDigits(str As String) As String Dim re As Object Set re = CreateObject("vbscript.regexp") re.Global = True re.Pattern = "\d+" RemDigits = re.Replace(str, "") End Function ========================== --ron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove number from text string | Excel Worksheet Functions | |||
Remove number from string in excel | Excel Discussion (Misc queries) | |||
remove text from string | Excel Worksheet Functions | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions | |||
want to remove all text characters equal to one character in length from text string | Excel Worksheet Functions |