Spliting Numbers from a Text string
Hello Ron,
IMHO it is a nice and robust approach to take the UDF regexpreplace as
a "black box" and then to call it (may it be from a worksheet or from
within VBA) with:
=regexpreplace(A1,"^05 (.+) PM" & REPT(" ([-+]?\d*\.?\d*)",7) &
"$","$1")
I have no problem to accept a better fitting regular expression here
but I would not even seek for a most efficient solution in VBA. If
efficiency is an issue (in terms of runtime) I would do the
preprocessing with sed or perl...
Regards,
Bernd
|