Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'This function to find a position of a string appear n time in a string and return a number
- Function FindN(sFindWhat As String, _
- sInputString As String, N As Integer) As Integer
- Dim J As Integer
- Application.Volatile
- FindN = 0
- For J = 1 To N
- FindN = InStr(FindN + 1, sInputString, sFindWhat)
- If FindN = 0 Then Exit For
- Next
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement