How can I prefill a text field with leading 0s?

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

Guest

I have a list on Text data
ie 1, 14, 203, etc
I want them all to be 6 charcters long.
ie 000001, 000014, 000203, etc.
I can concatenate but the I would manually need to remove extra 0's Any
suggestions
 
Set the format to 000000 (Format>Cells>Custom)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
If it is for display purposes, you can format (numbers, not text) using a
custom format of "000000"

If you need the values to 6 characters you can use for numeric values:
=text(number, "000000")

For text values:
=rept("0",6-len(text value))&text value
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top