View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Bernd P Bernd P is offline
external usenet poster
 
Posts: 806
Default Spliting Numbers from a Text string

Hello,

I suggest to take the UDF regexpreplace:

=regexpreplace(A1,"^05 (.+) PM" & REPT(" (\d*.?\d*)",7) & "$","$1")

(you can call it via VBA with another first parameter - the last
parameter defines the n-th return value. I you use "$4" it would
return 10.00 for your second sample row).

The function you can find he http://www.sulprobil.com/html/regexp.html

Regards,
Bernd