I have a text area on a form, and also a forumla field that displays the max number of words allowed to be enetered in the the text area.
I want to use a formula as a validation rule, that says if the word count is higher than the max then display an error.
Looking at the standard functions I can see there is not a word count function.
One thing that I did consider was counting using a regex for Character Space Character (a space normally separates to words).
Has anyone ever attempted a word count formula?
Best Answer
You can combine available functions to come up with the following formula which returns a number being the number of words in the field:
Here we are counting the number of words in the Name field.
A breakdown of how this works:
LEN(TRIM( Name ))
LEN(SUBSTITUTE( Name ," ",""))
LEN(TRIM( Name ))-LEN(SUBSTITUTE( Name ," ",""))+1