View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kim
 
Posts: n/a
Default Remove Characters from a cell

The user definable function worked.

I also download asap utilities, which I think will prove to be a valuable
tool.

Thanks to all

"Norman Jones" wrote:

Hi Kim,

I am unable to reproduce your result; I continue to get the expected 190000.

If you wish, send me a sample of your problematic result(s):

norman_jones@NOSPAMbtconnectDOTcom

(Delete "NOSPAM and replace "DOT" with a period [full stop])

Incidentally, and not germane to your immediate problem, replace:

DigitsOnly = oRegExp.Replace(sStr, vbNullString)


with

DigitsOnly = CLng(oRegExp.Replace(sStr, vbNullString))


---
Regards,
Norman


"Kim" wrote in message
...
I created the User Definable Function. Thank you for that. But I have in
cell A1
"Service 190,000 Klm" and in cell B1 I have "=digitsonly("A1")" but the
answer comes back as "1".

What am I doing wrong?

P.S. I'm new to creating User Definable Functions but I inserted a module
into this sheet after hitting ALT F11. So I think that's not the problem.

Thanks