K
KK
Hello,
I have a spreadsheet with cells containing strings of characters. eg DWDE
or WWN or ENWEE etc. Strings are not necessarily the same length but are 5
characters maximum.
I want to count the numbers of each character in each string. so for the 1st
example above I want to end up with the answer 2 for the number of Ds, 1 for
Ws, 1 for Es. For the last example I need 0 for Ds, 3 for Es, 1 for Ns, 1
for Ws etc.
I can do it using the MID function, testing the string character by
character to see if it is equal to 'D' or 'W' etc, and counting logical
'yes' values. It works OK, but it is very messy. Am I missing something more
elegant?
Thanks
KK
I have a spreadsheet with cells containing strings of characters. eg DWDE
or WWN or ENWEE etc. Strings are not necessarily the same length but are 5
characters maximum.
I want to count the numbers of each character in each string. so for the 1st
example above I want to end up with the answer 2 for the number of Ds, 1 for
Ws, 1 for Es. For the last example I need 0 for Ds, 3 for Es, 1 for Ns, 1
for Ws etc.
I can do it using the MID function, testing the string character by
character to see if it is equal to 'D' or 'W' etc, and counting logical
'yes' values. It works OK, but it is very messy. Am I missing something more
elegant?
Thanks
KK