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
 61.2K Get Help
 320 Global Discussions
 197 Industry Talk
 415 Announcements
 4.2K Ideas & Feature Requests
 126 Brandfolder
 153 Just for fun
 124 Community Job Board
 441 Show & Tell
 26 Member Spotlight
 1 SmartStories
 276 Events
 34 Webinars
 7.3K Forum Archives
Check out the Formula Handbook template!