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! 😊

• 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

• 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!

• 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

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!