View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions,microsoft.public.excel
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default How can I convert a character string that contains letters & numbers "£2,456.99 (including flights)" into a numeric?

On 3 Apr 2007 05:51:16 -0700, "ship" wrote:

On Apr 3, 1:41 pm, "ship" wrote:
Hi

How do I convert a string that contains letters and numbers
into a number using Excel2003 (or ms Access)

e.g. "£2,456.99 (including flights)"

== needs to be converted into the the numeric 2456.99

With thanks

ShipShipertonHenethe


I dont know what characters are going to be before or after the
number.
Basically I want to remove ALL characters apart from "0" to "9" and
"."
and then convert it into a numeric.

Any thoughts?


Ship






With your string in A1, you could use this formula, courtesy of Bob Phillips:

=LOOKUP(9.99999999999999E+307,--MID(
A1,MIN(SEARCH({0,1,2,3,4,5,6,7,8,9},A1&
"0123456789")),ROW(INDIRECT("1:"&LEN(A1)))))

--ron