• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

count words VBA

I would use a Function such as:
Code:
Function CountWords(word) As Integer

CountWords = Len(word) - Len(Replace(word, " ", "")) + 1

End Function

then in Excel
=CountWords(A2)

or in VBA
NoWords = CountWords(word)
 
Back
Top