'Function to find the Number of time Each Char exist in the String
CoutChar("aaaabbbcccccc")
Function CoutChar(InpStr)
For i = 1 To len(InpStr)
Char=lcase(mid(InpStr,i,1))
Select Case Char
Case "a"
A=A&"a"
Case "b"
B=B&"b"
Case "c"
C=C&"c"
Case "d"
D=D&"d"
End Select
Next
msgbox "Number Of time a Exist="&" "&len(A)
msgbox "Number Of time b Exist="&" "&len(B)
msgbox "Number Of time c Exist="&" "&len(C)
End Function
No comments:
Post a Comment