Standardising number length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a long list of numbers that I need to standardise to 8 characters. For example:

5 to 00000005
18 to 00000018
1465 to 00001465

Is there a quick way of doing this rather than manually going into each cell?
 
Hi
either apply the custom format
00000000
for this column / for these cells

or if you need it as string value use
=TEXT(A1,"00000000")
in a helper column
 
If its just a question of displaying them that way, create a custom number format :

Select the cells containing the numbers. Right click and select Format Cells. Go to the Number tab, select Custom and then type the following in the box: " 00000000 " without the quote marks.

If, on the other hand, you actually want a string of eight digits (in which case, text rather than a number) enter this formula:

=REPT("0",8-LEN(A1))&A1

Change A1 to the address of the cell containing your number.
 
Back
Top