In sheets, suppose cell A1
contains the word CABBAGE
.
I want to put a formula into, say, cell B1
that will count the number of different letters. So the output should be 5
, because there are 5 different letters in CABBAGE
.
I have a formula that will do this, however it is cumbersome and I bet there is a way to do it more concisely.
The formula that works is:
=if(isnumber(search("A",A1)),1,0) + if(isnumber(search("B",A1)),1,0) + ... + if(isnumber(search("Z",A1)),1,0)
The formula adds 1 each time a letter is present in the word. I'm just not sure of the best way to consolidate the 26 terms into something more manageable.