Is there a formula that will automatically add zeros in front of numbers added to a cell?

Is it possible to have this number show, 000000065145, while only typing in 65145? I need to have seven leading zeros before the number.

Best Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓

    Hi @bcfish ,

    You can add a helper column to contain the string with 7 leading 0s. You'll enter the number in another column [number].

    The column formula in the helper column will be:

    ="0000000"+[number]@row

    Make sense?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @bcfish

    I hope you're well and safe!

    To add to Mark's excellent advice/answer.

    The number will be converted to text because of the zeros before the original number, but it should work as long as you don't use it for any calculations or similar.

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

Answers

  • Mark Cronk
    Mark Cronk ✭✭✭✭✭✭
    Answer ✓

    Hi @bcfish ,

    You can add a helper column to contain the string with 7 leading 0s. You'll enter the number in another column [number].

    The column formula in the helper column will be:

    ="0000000"+[number]@row

    Make sense?

    Mark


    I'm grateful for your "Vote Up" or "Insightful". Thank you for contributing to the Community.

  • Andrée Starå
    Andrée Starå ✭✭✭✭✭✭
    Answer ✓

    Hi @bcfish

    I hope you're well and safe!

    To add to Mark's excellent advice/answer.

    The number will be converted to text because of the zeros before the original number, but it should work as long as you don't use it for any calculations or similar.

    I hope that helps!

    Be safe and have a fantastic weekend!

    Best,

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    Did my post(s) help or answer your question or solve your problem? Please support the Community by marking it Insightful/Vote Up or/and as the accepted answer. It will make it easier for others to find a solution or help to answer!

    SMARTSHEET EXPERT CONSULTANT & PARTNER

    Andrée Starå | Workflow Consultant / CEO @ WORK BOLD

    W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35

    Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.

  • CAS the CSA
    CAS the CSA ✭✭✭
    edited 07/02/24

    similarly I don't use the helper column but write it into the formula

    =right("000"+[column A]@row,3)

    • 1 becomes 0001 becomes 001
    • 41 becomes 00041 becomes 041
    • 241 becomes 000241 becomes 241

    ** be aware of your max digits if you have potential for a number to be larger than the leading zeros you accounted for.

    • 5241 becomes 0005241 becomes 241

    you would have to up the formula to accommodate

    =right("000"+[column A]@row,4)

    • 5241 becomes 0005241 becomes 5241

    or

    =right("0000"+[column A]@row,4)

    • 5241 becomes 00005241 becomes 5241

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!