I want a function that can count the words in a cell. Help please?
I want a function that can count the words in a cell. Help please?
If the sentence:
"The dog is brown."
...is in cell A1, then this formula will give you the answer of "4":
=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+1
We're basically counting the spaces and adding 1.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Just in case A1 is empty.......
=LEN(A1)-LEN(SUBSTITUTE(A1," ",""))+(LEN(A1)>0)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks