ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Format a date within a formula (https://www.excelbanter.com/excel-discussion-misc-queries/196654-format-date-within-formula.html)

SJW_OST[_2_]

Format a date within a formula
 
I have table names that must have a 2 digit date at the end. I want to
automate a spreadsheet to use my tables names and put in the 2 digit date
using a formula.
A full, proper table name looks like this;

FAAA_2LOW_28

The 2 digit date is todays date and must be at the end with the underscore
preceding it. How can I put a formualted date in one cell, 7/28/08 using only
the 28, my table name in another cell, FAAA_2LOW, and then concatenate them
together as shown above? Everytime I try to do this the date ends up as
numbers.

Thanks in advance for any help.

Fred Smith[_4_]

Format a date within a formula
 
Use the Text function, as in:

=A1&"_"&Text(a2,"dd")

Regards,
Fred.

"SJW_OST" wrote in message
...
I have table names that must have a 2 digit date at the end. I want to
automate a spreadsheet to use my tables names and put in the 2 digit date
using a formula.
A full, proper table name looks like this;

FAAA_2LOW_28

The 2 digit date is todays date and must be at the end with the underscore
preceding it. How can I put a formualted date in one cell, 7/28/08 using
only
the 28, my table name in another cell, FAAA_2LOW, and then concatenate
them
together as shown above? Everytime I try to do this the date ends up as
numbers.

Thanks in advance for any help.



FSt1

Format a date within a formula
 
hi
try this
=A1&"_"&DAY(TODAY())
but if you have a date in a cell, say b1 then
=A1&"_"&DAy(B1))

regards
FSt1

"SJW_OST" wrote:

I have table names that must have a 2 digit date at the end. I want to
automate a spreadsheet to use my tables names and put in the 2 digit date
using a formula.
A full, proper table name looks like this;

FAAA_2LOW_28

The 2 digit date is todays date and must be at the end with the underscore
preceding it. How can I put a formualted date in one cell, 7/28/08 using only
the 28, my table name in another cell, FAAA_2LOW, and then concatenate them
together as shown above? Everytime I try to do this the date ends up as
numbers.

Thanks in advance for any help.



All times are GMT +1. The time now is 12:53 PM.

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