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.4K Get Help
- 395 Global Discussions
- 213 Industry Talk
- 449 Announcements
- 4.6K Ideas & Feature Requests
- 141 Brandfolder
- 133 Just for fun
- 131 Community Job Board
- 453 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 293 Events
- 35 Webinars
- 7.3K Forum Archives