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
Hi, I was trying to get the multiple occurrences of a particular character inside a sentence and I could get that done with the above code, but I was getting that in different cells based on the nth number that I am giving in the formula. But I need all the occurrences of that particular character in that sentence and all that need to be found in a single cell only. Please help me how I can alter the above code to get that sort of result. Please advise.
Get Substring Positions (UDF)
If cell
A1contains...... the results for the function are...