Formula for counting number of words in a cell
Hello,
I am trying to figure out how to create a formula to count the number of words in a cell. Can anyone help? I know how to do this in excel and Google Sheets, but Smartsheet is not able to parse the excel formula as is. The reason I need to do this is we are creating answers for voice search queries and the optimal length is 29 words or less. Thank you!
Comments
-
My Assumptions:
1. Words are separated by one and only one space.
2. There is at least one word.
3. My column containing the text is [Text Col]
The formula:
=LEN([Text Col]@row) - LEN(SUBSTITUTE([Text Col]@row, " ", "")) + 1
This counts the total length of the string and the total length of the string without spaces and then adds 1.
I hope this gives you what you need.
Craig
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.8K Get Help
- 410 Global Discussions
- 219 Industry Talk
- 457 Announcements
- 4.7K Ideas & Feature Requests
- 143 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives