View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Remove text from cell

On 7 Apr 2006 05:32:51 -0700, "Pete_UK" wrote:

As an alternative, you could have a short User Defined function which
examines each character of the string and removes any which are not in
the range 0 to 9.

Pete


Sure. Anything that can be done with an add-in can be duplicated in VBA.
However, the .xll add-in will run faster, and is quite a bit more flexible than
other solutions.

For example, if there are multiple strings of numbers, you could easily rewrite
the regex to only return the second string; or only return strings that look
like valid dates; or ... The possibilities are endless.


--ron