Count number of specific characters in a string
JacobL
✭
Hi! I'm trying to write a formula that will give me the level of an item in a Work Breakdown Structure (WBS). The formula needs to read the number of decimals in a string. For example:
- 1 = 1
- 2.12 = 2
- 3.1.14 = 3
- 2.1.1.1 = 4
- 2.327.1 = 3
The FIND function seems to be heading down the right track (by selecting the "." character from the string) but it only returns the first occurrence of the character. Any tips that would send me in the right direction?
Thank you,
Jake
Comments
-
We use a helper column that counts the levels which we then use for conditional formatting. This may not be exactly what you need but it will count levels down.
=IF(COUNT(CHILDREN([Column Name]@row)) > 0, COUNT(ANCESTORS()) + 1)
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