ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   =TEXT fuction (https://www.excelbanter.com/excel-programming/445214-%3Dtext-fuction.html)

gary c

=TEXT fuction
 
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 " ")?



joeu2004[_2_]

=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.


gary c

=TEXT fuction
 
On Dec 24, 9:21*am, "joeu2004" wrote:
"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.


Thank you, very much.

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



All times are GMT +1. The time now is 11:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com