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
- Add new comment
- 2133 reads

Recent comments
6 hours 28 min ago
9 hours 51 min ago
10 hours 14 min ago
16 hours 17 min ago
17 hours 8 min ago
1 day 7 hours ago
1 day 7 hours ago
1 day 11 hours ago
1 day 19 hours ago
2 days 14 hours ago