View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default removing text characters from a cell

Already noted Jarek

Thanks for the pointing-out.


Gord


On Tue, 23 Dec 2008 23:39:01 -0800 (PST), Jarek Kujawa
wrote:

Incorrect Gord

see Ron's answer...


On 23 Gru, 21:07, Gord Dibben <gorddibbATshawDOTca wrote:
Function RemAlpha(str As String) As String
'Remove Alphas from a string
Dim re As Object
Set re = CreateObject("vbscript.regexp")
* * re.Global = True
* * re.Pattern = "\D"
RemAlpha = re.Replace(str, "")
End Function

=RemAlpha(cellref)*1 * * *the *1 produces a numeric value

Gord Dibben *MS Excel MVP

On Tue, 23 Dec 2008 10:55:07 -0800, volleygods



wrote:
I need to find an easy function or macro to remove all text characters from a
cell.
EX. Pail=19KG *converts to 19- Ukryj cytowany tekst -


- Pokaż cytowany tekst -