Not sure what your question is..... maybe it is "Given an input of
'xan72aa-7.5', how do I modify my code to have the UDF return 'xan72-7.5'?"
3 examples is not a very big sample, so I won't guarantee the following code
snippets will work in every case.
Here are 3 ways to modify the Select Case() part of the code:
'x1---------------
Select Case ch
Case "0" To "9"
boolNum = True
tmp = tmp & ch
Case "w"
tmp = tmp & ch
If boolNum = True Then
Exit For
End If
Case "-", ".", "/"
tmp = tmp & ch
Case Else
If boolNum = False Then
'no number char yet
tmp = tmp & ch
End If
End Select
'--------------------------------
OR
'x2---------------
Select Case ch
Case "0" To "9", "-", "."
boolNum = True
tmp = tmp & ch
Case "w"
tmp = tmp & ch
If boolNum = True Then
Exit For
End If
Case Else
If boolNum = False Then
'no number char yet
tmp = tmp & ch
End If
End Select
'--------------
OR
'x3---------------
Select Case ch
Case "0" To "9"
boolNum = True
tmp = tmp & ch
Case "w"
tmp = tmp & ch
If boolNum = True Then
Exit For
End If
Case "-", ".", "/"
tmp = tmp & Right(pString, Len(pString) - i + 1)
Exit For
Case Else
If boolNum = False Then
'no number char yet
tmp = tmp & ch
End If
End Select
'---------------------
Replace your Select Case code with ONE of the above examples.
HTH

Signature
Steve S
--------------------------------
"Veni, Vidi, Velcro"
(I came; I saw; I stuck around.)
> the following module produces these results:
>
[quoted text clipped - 45 lines]
> Resume Exit_fGetFirstCharsNums
> End Function