Thread: =TEXT fuction
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default =TEXT fuction

"gary c" wrote:
How do I write a =TEXT function where "value" refers to
C5 and "format-text" returns the contents of C5 with
10-characters (for example:
"04-15-2010" or "12-02-2002" or " ")?


=LEFT(C5&REPT(" ",10),10)

You can replace REPT(" ",10) with a string that contains spaces. I used
REPT for clarity and flexibility.