kashif.special2005
Active Member
- Joined
- Oct 26, 2009
- Messages
- 443
Hi,
I want to find the position of first number position withing a word
like kashif5khan
I want the position of 5,
I am using this UDF function but this is not working
Public Function Result1(output As String) As Integer
Dim le As Long
Dim t As Variant
Dim k As Integer
le = Len(output)
For i = 1 To le
If Mid(output, i, 1) >= 0 Then
t = Mid(output, i, 1)
k = InStr(1, output, t)
End If
Next i
Result1 = k
End Function
Please help me.
Thanks & Regards,
Kashif.
I want to find the position of first number position withing a word
like kashif5khan
I want the position of 5,
I am using this UDF function but this is not working
Public Function Result1(output As String) As Integer
Dim le As Long
Dim t As Variant
Dim k As Integer
le = Len(output)
For i = 1 To le
If Mid(output, i, 1) >= 0 Then
t = Mid(output, i, 1)
k = InStr(1, output, t)
End If
Next i
Result1 = k
End Function
Please help me.
Thanks & Regards,
Kashif.