F
Fábio Coatis
Suppose this :
Sub Test()
Dim str1 As String
Dim str2 As String
Dim i As Integer
Dim arrTokens() As String
str1 = "tftftffftftftftftftf"
str2 = Left(str1, 1)
For i = 2 To Len(str1)
If Mid(str1, i, 1) = Mid(str1, i - 1, 1) Then
str2 = str2 & Mid(str1, i, 1)
Else
str2 = str2 & "," & Mid(str1, i, 1)
End If
Next i
ReDim arrTokens(dhCountTokens(str2, ",") - 1)
arrTokens = Split(str2, ",")
End Sub
I need to know the frequncy of each unique value of arrTokens array. In this
case:
T = 9
F = 8
FFF = 1
Any ideas?
Thanks in advance.
Fabio Coatis
Sub Test()
Dim str1 As String
Dim str2 As String
Dim i As Integer
Dim arrTokens() As String
str1 = "tftftffftftftftftftf"
str2 = Left(str1, 1)
For i = 2 To Len(str1)
If Mid(str1, i, 1) = Mid(str1, i - 1, 1) Then
str2 = str2 & Mid(str1, i, 1)
Else
str2 = str2 & "," & Mid(str1, i, 1)
End If
Next i
ReDim arrTokens(dhCountTokens(str2, ",") - 1)
arrTokens = Split(str2, ",")
End Sub
I need to know the frequncy of each unique value of arrTokens array. In this
case:
T = 9
F = 8
FFF = 1
Any ideas?
Thanks in advance.
Fabio Coatis