Function countwords(ByVal str As String)
Dim result As Integer
result = UBound(Split(Trim(Replace(str, Space(2), Space(1))))) + 1
Return result
End Function
Happy Coding!
Function countwords(ByVal str As String)
Dim result As Integer
result = UBound(Split(Trim(Replace(str, Space(2), Space(1))))) + 1
Return result
End Function