NumberFoundinsideTag

Checks if a number found between two characters, searching can be customized to start from CharsGoBack characters (default 20) before closing tag.
Returns 0 or 1
1 if we found a numeric value between > and inside InString
    Searching starts from 20 character before we find the
0 if not
This marks the code number 1,000 in this website! something to celebrate.

CodeFunctionName
What is this?

Public

Tested

Original Work
Function NumberFoundinsideTag(InString, Optional BeforeNumber = " >", Optional AfterNumber = " </span >", Optional CharsGoBack = 20)
    ' Returns 0 or 1
    ' 1 if we found a numeric value between > and </span > inside InString
    '    Searching starts from 20 character before we find the </span >
    ' 0 if not
    ' Needs VBInstr, CutString, CutString1
    '
    Rett = 0
    SpanClose = VBInstr(AfterNumber, InString)
    If SpanClose > 0 Then
        Nuu = CutString1(InString, SpanClose - CharsGoBack)
        Nuu = CutString(Nuu, BeforeNumber, AfterNumber)
        If IsNumeric(Nuu) Then Rett = 1
    End If
    NumberFoundinsideTag = Rett
End Function

InString, Optional BeforeNumber = ">", Optional AfterNumber = "", Optional CharsGoBack = 20

Views 122

Downloads 41

CodeID
DB ID