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?

3 Answers 3


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 Sep 13, 2015 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