=TEXT fuction

G

gary c

C5 has a text format and contains, for example, "04-15-2010" or
"12-02-2002" or is empty.

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 " ")?
 
J

joeu2004

gary c said:
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.
 
G

gary c

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

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

Thank you, very much.

Now I'll post a new more-complidated question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top