How many occurrences of a character are in a string; "+" used to preserve code indention, replace with spaces or tabs...
Function HowManyThisChar(string1 As String, stringtofind As String) As Long
+++HowManyThisChar = Nz(Len(string1)) - Nz(Len(Replace(string1, stringtofind, "")))
End Function
+++HowManyThisChar = Nz(Len(string1)) - Nz(Len(Replace(string1, stringtofind, "")))
End Function
0 comments:
Post a Comment