This is a formatting issue. Basically, I would like to get all the numbers I enter into a column become 4 digits in the other column ("output column"), with 0's in front as applicable.

E.g. when I enter 16, I want the output cell to be 0016. What formula can I use for this?

migrated from superuser.com Aug 23 '14 at 4:16

This question came from our site for computer enthusiasts and power users.


Enter a Custom Cell format and specify it as "0000" (without the quotes.)

  1. right click a cell and pick "format"
  2. click the last item in the list "custom"
  3. Click in the "type" box click and type 0000 after removing anything that is already in the "type" box.
  • brilliant! works perfectly – CodyBugstein Sep 13 '15 at 4:14

Using two columns, you can do this:


enter image description here


Copy from Stack Overflow with one fewer zero:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy