08 Jul
Posted by Chandoo in Analytics, Excel Tips, hacks, ideas, technology

I was doing some weird analysis on corporate mission statements and I had to count the number of words in each cell. That is when I realized there is no formula to calculate the number of words in a cell, I was too lazy to write an UDF for that, so I figured out a nearly perfect way to calculate no. of words in a cell using existing formulas.
If you want to calculate the no. of words in cell a1, then use the formula:
=len(a1)-len(substitute(a1," ",""))+1
What this does is, it calculates the number of spaces in a cell and adds 1 to it, thus almost finding the number of words in a cell. I say almost because, if a cell has “this blog rocks,really!”, this formula will calculate the words as 3, where as there are 4 words in there
But that is for you to think
Also: Concatenate a bunch of cells using simple formula, Generate tag clouds in excel using vba, Master your IFs and BUTs
2 Responses
How to count words in a cell using excel functions - Learn Excel
July 11th, 2008 at 12:04 am
1[...] Original post by Chandoo [...]
Changing Sort Orientation in Excel - Sorting across columns instead of rows | Pointy Haired Dilbert - Chandoo.org
July 22nd, 2008 at 6:15 pm
2[...] see: How to count words in an excel cell, Fill only weekdays when auto-filling dates, Find unique items in a list Tags: data, excel, [...]
RSS feed for comments on this post · TrackBack URI
Leave a reply
Welcome :)
Quick Facts
I am Chandoo, when I started this blog in 2004, the purpose was to post snapshots from hell to share my b-school life with world.
Today this blog has over 600 articles in topics like Excel, Business, Advertising, Technology, Photography and Life in Indian B-schools.
Interested? Know more or mail me at: chandoo [dot] d [at] gmail [dot] com
Recent Comments
Categories
Recently PHD wrote
Monthly Archives
Category-wise Archives
Blogroll
PHD Link Love
Hungry for Spam
Disclaimer