Make number a given number of digits using Excel

Posted on


I need to convert 1, 11, 111, and 1111 to 0001, 0011, 0111, and 1111, and then append some text to the resultant. I know how to format the cells as custom 4 digits, but this does not allow me to use them in a formula and append text.


To add leading zeros, use the TEXT function:


enter image description here

To append text, use &

= C1&B1

enter image description here

I’m using LibreOffice, but you should have these functions in Excel:

=CONCATENATE(TEXT(A1,"0000")," ",A2)

Leave a Reply

Your email address will not be published. Required fields are marked *