View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jarek Kujawa[_2_] Jarek Kujawa[_2_] is offline
external usenet poster
 
Posts: 896
Default removing text characters from a cell

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 -