G
Guest
excel: how to count uppercase letters in a cell
harry bachrach said:excel: how to count uppercase letters in a cell
Not the shortest formula of the bunch... just another method to accomplish
the task.
=SUMPRODUCT((CODE(MID(A1,ROW(INDIRECT("A1:A"&LEN(A1))),1))>65)*(CODE(MID(A1,ROW(INDIRECT("A1:A"&LEN(A1))),1))<91))
=SUMPRODUCT(1*(ABS(77.5-CODE(MID(A1,ROW(INDIRECT("A1:A"&LEN(A1))),1)))<13))
harry bachrach said:excel: how to count uppercase letters in a cell
Leo Heuser said:Contrary to the other suggestions, here's one that works for
all characters not only the characters of the English alphabet <bg>
=SUMPRODUCT((CODE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))=
CODE(UPPER((MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)))))+0)
include any letters one would care to check.
Harlan Grove said:You might want to consider testing before you post. And maybe reading OPs
CAREFULLY. Where, Oh Great Internationalizer, did the OP mention that the
cells s/he would be checking would include ONLY letters? Or do you have
such feable grasp of how UPPER works that you're ignorant of the fact that
it returns the same character for NON-LETTERS?
The brute force approach I showed is at least easily adapted to include
any letters one would care to check. Why, even you should be able to
figure out how to adapt it without screwing up.
Leo Heuser said:Quote
"how to count uppercase letters in a cell"
Unquote
And where did s/he mention, that the cells would include ANYTHING ELSE but
letters?
That's YOUR interpretation. MINE is, that the OP is talking about strings
of
letters. That's what I tested for, and my formula works under that
condition.
Sure, and my formula will work everywhere without any additional editing
whatsoever.