Hi, i need to be able to search a very long string (about 50,000 chars) and determine a position of the 1000th comma, then the 2000th and so on
i found a function that does exactly what i need but with shorter strings, it overflows with 50K chars
any ideas? thank you
i found a function that does exactly what i need but with shorter strings, it overflows with 50K chars
Code:
Public Function CharPos(SearchString As String, Char As String, Instance As Long)
Dim x As Integer, n As Long
For x = 1 To Len(SearchString)
CharPos = CharPos + 1
If Mid(SearchString, x, Len(Char)) = Char Then n = n + 1
If n = Instance Then Exit Function
Next x
CharPos = CVErr(xlErrValue)
End Function
any ideas? thank you