Thread: excel macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
mp mp is offline
external usenet poster
 
Posts: 70
Default excel macro



"Rose Men" wrote in message
...
Hi ,
I have a record character variable which has less than 9 length,
I need converted to a 9 character text field with leading 0’s.
how can i coded in MACRO so that I can automaticly transfer them to 9
length next time when I get more data to excel.
Thank you very much.
Rose

check out Format function
format(1,"00000000#")
format(12,"00000000#")
format(123,"00000000#")
format(1234,"00000000#")
etc
hth
mark