How about this function:
Function NUMEXTRACT(rng As Range, Optional delim As String)
Dim Arr() As String
Dim x As String
If Len(delim) = 0 Then
delim = " "
End If
Arr() = Split(rng, delim)
For i = LBound(Arr) To UBound(Arr)
For j = 1 To Len(Arr(i))
If IsNumeric(Mid(Arr(i), j, 1)) Then
x = x & delim & Arr(i)
Exit For
End If
Next j
Next i
NUMEXTRACT = Trim(Mid(x, 2, Len(x)))
End Function
use it as any other function:
Formula:
=NUMEXTRACT(A1, " ")
Where you have range and delimiter (in your case space).
if no delimiter space will be default so
Formula:
=NUMEXTRACT(A1)
will work too.
Bookmarks