View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bj bj is offline
external usenet poster
 
Posts: 1,397
Default changing text values to a different string

custom format of cells can have numbers with leading zeros
formatcellsnumbercustom000
change the text to numbers
by
=value(text)

If however you want them to remain text as I think you want to from the
second half of your statement
if the length of the _____1 portion is always the same (8?) so that you want
11 characters

try
=rept("0",11-len(text_cell))&text_cell

"sparks" wrote:

We have cells that are text and 1 2 3 .....110

the problem is now they want them as
001
002
099
100


can can the 1 2 3 98 99 be converted to leading 0's automatically

this wouldn't be too bad but it also has visit no's

so I have

ID VISIT
1_____1
1_____2
1_____3
1_____4
2_____1
..
..
..
99_____3
99_____4

ect


this is becoming a nightmare to me

thanks for any help