4

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?

7

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.
| improve this answer | |
  • brilliant! works perfectly – CodyBugstein Sep 13 '15 at 4:14
0

Using two columns, you can do this:

=TEXT(A1,"0000")

enter image description here

| improve this answer | |
0

Copy from Stack Overflow with one fewer zero:

=ArrayFormula(text(A1:A,"0000"))
| improve this answer | |

Your Answer

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