Word Count in Cell using Split
![Vishesh's picture Vishesh's picture](http://excelexperts.com/sites/default/files/pictures/picture-592.jpg)
This, I think, is the simplest of code to find the word count in a cell using the Split function. Its a single line code but very useful.
Download the attachment file to see how this is used as user defined function in excel and as a formula.
Function intWordCount(rng As Range) As Integer intWordCount = UBound(Split(rng.Value, " "), 1) + 1 End Function
Attachment | Size |
---|---|
WordCountUsingSplit.xls | 16 KB |
»
- Vishesh's blog
- Login or register to post comments
- 14634 reads
Recent comments
5 years 48 weeks ago
6 years 33 weeks ago
6 years 45 weeks ago
6 years 48 weeks ago
6 years 49 weeks ago
7 years 2 weeks ago
7 years 11 weeks ago
7 years 11 weeks ago
7 years 11 weeks ago
7 years 11 weeks ago