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
- 14542 reads
Recent comments
5 years 34 weeks ago
6 years 20 weeks ago
6 years 32 weeks ago
6 years 35 weeks ago
6 years 36 weeks ago
6 years 42 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago
6 years 50 weeks ago