Word Count in Cell using Split
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
- 14586 reads
Recent comments
5 years 42 weeks ago
6 years 28 weeks ago
6 years 40 weeks ago
6 years 42 weeks ago
6 years 43 weeks ago
6 years 49 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago
7 years 5 weeks ago