View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sweetetc
 
Posts: n/a
Default How can I prefill a text field with leading 0s?

Duke

Thanks the TXT seemed to do the trick. I could not get the REPT to work
correctly
--
Thanks
ETC


"Duke Carey" wrote:

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


"Sweetetc" wrote:

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

--
Thanks
ETC