04-25-2024, 01:07 AM
A simply way to get the letters in a word or phrase sorted in alphabetical order...
If you'd like to see how many times a letter occurred, it's just a little more code...
Pete
Code: (Select All)
a$ = "uncopyrightable"
For i = 1 To 26
If InStr(LCase$(a$), Chr$(96 + i)) Then Print Chr$(96 + i);
Next
If you'd like to see how many times a letter occurred, it's just a little more code...
Code: (Select All)
a$ = "lots of letters repeated"
For i% = 1 To 26
seed% = InStr(LCase$(a$), Chr$(96 + i%))
If seed% Then
Do
If InStr(seed%, LCase$(a$), Chr$(96 + i%)) Then
Print Chr$(96 + i%);
seed% = InStr(seed%, LCase$(a$), Chr$(96 + i%)) + 1
Else
Exit Do
End If
Loop
End If
Next
Pete
Shoot first and shoot people who ask questions, later.