Extract Number from string.

By Md.shaiful islam Talukder | 11:51 PM |
It is difficult extract number from string. Because , manually extract is not easy and killing time . If you use simple Vb.....
Code it is easily extract ,thousand number extract from string mini second.  This simple code insert bellow copy and pest in open workbook (tools->Macro->Visual basic editor->Insert module->paste )easily find solution.
Function Number(ByVal CurrString As String)
    Dim temp As String
    
    temp = Left(CurrString, 1)
    Do While Not IsNumeric(temp)
        If Len(CurrString) <= 1 Then
            Exit Function
        Else
            CurrString = Mid(CurrString, 2)
            temp = Left(CurrString, 1)
        End If
    Loop
    Number = Val(CurrString)
End Function
'---------------- Md .Shaiful Islam talukder--------------------



0 comments :

Post a Comment

Top^