LEN counts "Space" as a character
Hello,
How do I prevent LEN from counting spaces between words as characters?
Thank you.
=LEN([Letters]@row) * 10.75 * Height@row
Best Answers
-
Create a helper column. Use the SUBSTITUTE function to replace the blanks in the text with nothing, thereby removing the blanks. Then use LEN against the helper column.
You could also do it without the helper column by placing the SUBSTITUTE within the LEN formula:
=LEN(SUBSTITUTE([Letters]@row, " ", ""))
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
=LEN(SUBSTITUTE([Letters]@row, " ", "")) works.
=LEN(SUBSTITUTE([Letters]@row, " ", "")) * 10.75 * Height@row
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers
-
Create a helper column. Use the SUBSTITUTE function to replace the blanks in the text with nothing, thereby removing the blanks. Then use LEN against the helper column.
You could also do it without the helper column by placing the SUBSTITUTE within the LEN formula:
=LEN(SUBSTITUTE([Letters]@row, " ", ""))
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
Works well, although I hope that there's a better way to do it by using exact cell.
Thank you, Jeff.
-
=LEN(SUBSTITUTE([Letters]@row, " ", "")) works.
=LEN(SUBSTITUTE([Letters]@row, " ", "")) * 10.75 * Height@row
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
It works perfectly. Thanks, Jeff, I appreciate it
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!