Removing with Leading Zeros
Hello Smartsheet Community!!
We are having a bit of a struggle with leading zeros and trying to strip them out of our project numbers.
When we use this formula, it removed all zeros in the project numbers. For the project numbers that do not have any zeros other than the leading zero, it still allows us to do an index match.
VALUE(SUBSTITUTE(Number@row, 0, ""))
When we use this formula, it gives us the results we are looking for (just removing the leading zero), but our index matches no longer work.
IF(LEFT(Number@row, 1) = "0", RIGHT(Number@row, LEN(Number@row)  1), Number@row)
Any suggestions are greatly appreciated. Thank you! 😊
Best Answer

Hey @Nancy Heater
The VALUE function should do the trick for you. (By the way, did you try just using the VALUE() function without the SUBSTITUTE() to your first formula? =VALUE(Number@row)
When using the LEFT, RIGHT, MID, SUBSTITUTE etc, the values become textstrings. Try this
IF(LEFT(Number@row, 1) = "0", VALUE(RIGHT(Number@row, LEN(Number@row)  1)), Number@row)
Will this work for you?
Kelly
Answers

Hey @Nancy Heater
The VALUE function should do the trick for you. (By the way, did you try just using the VALUE() function without the SUBSTITUTE() to your first formula? =VALUE(Number@row)
When using the LEFT, RIGHT, MID, SUBSTITUTE etc, the values become textstrings. Try this
IF(LEFT(Number@row, 1) = "0", VALUE(RIGHT(Number@row, LEN(Number@row)  1)), Number@row)
Will this work for you?
Kelly

Good morning @Kelly Moore ! That did the trick  thank you so very much!

Hey @Nancy Heater
Glad it worked. Just out of curiosity, was it the =VALUE(Number@row) that worked, or the text parsing formula? I hoped with only a leading zero it would be the simpler one.
Kelly

They both worked!
Help Article Resources
Categories
 All Categories
 14 Welcome to the Community
 Smartsheet Customer Resources
 63.8K Get Help
 406 Global Discussions
 219 Industry Talk
 457 Announcements
 4.7K Ideas & Feature Requests
 141 Brandfolder
 136 Just for fun
 57 Community Job Board
 459 Show & Tell
 31 Member Spotlight
 1 SmartStories
 297 Events
 37 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!