View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default Defined number of characters

Try someting like:

=IF(LEN(A1)<=6,TEXT(A1,"000000"),TEXT(RIGHT(A1,6), "000000"))

HTH
JG

"Carrie" wrote:

I have a spreadsheet that has numerical values in cells of different lengths,
ie xxx, xxxxxx, etc. I need to make all the values 6 characters long by
adding or removing zeros at the beginning and therefore not altering the
value. I then want it to appear as text rather than number. Can anyone help