ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Concatenate data that includes dates (https://www.excelbanter.com/excel-worksheet-functions/158740-concatenate-data-includes-dates.html)

dave caizley

Concatenate data that includes dates
 
I have a workbook that provides for a cell to have a date entered as part of
the approval process. I then want to include that date cell in a
concatenation with two otther cells to form a file name and then possibly by
way of a macro to copy and paste special that data so that it forms a text
string that someone can paste into an e-mail heading.

Every way I have tried it, the date always reverts to its core number format.

Am I trying to achieve the impossible witthin Excel 2003

Thanks in anticipation

Max

Concatenate data that includes dates
 
Think you can use TEXT to specify the format

Eg, in C2: =A2&" "&TEXT(B2,"dd-mmm-yyyy")
where B2 contains the date data in the concat

Adapt the format to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dave caizley" wrote:
I have a workbook that provides for a cell to have a date entered as part of
the approval process. I then want to include that date cell in a
concatenation with two otther cells to form a file name and then possibly by
way of a macro to copy and paste special that data so that it forms a text
string that someone can paste into an e-mail heading.

Every way I have tried it, the date always reverts to its core number format.

Am I trying to achieve the impossible witthin Excel 2003

Thanks in anticipation


dave caizley

Concatenate data that includes dates
 
Hi Max

Thanks for the response. I wasnt aware of that method of concatenation so I
have learnt something. However, Excel wouldnt accept the formula. I have
tried to reformat the cell so that it gives that same date format as your
formula but it still wouldnt accept it.

Regards

"Max" wrote:

Think you can use TEXT to specify the format

Eg, in C2: =A2&" "&TEXT(B2,"dd-mmm-yyyy")
where B2 contains the date data in the concat

Adapt the format to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dave caizley" wrote:
I have a workbook that provides for a cell to have a date entered as part of
the approval process. I then want to include that date cell in a
concatenation with two otther cells to form a file name and then possibly by
way of a macro to copy and paste special that data so that it forms a text
string that someone can paste into an e-mail heading.

Every way I have tried it, the date always reverts to its core number format.

Am I trying to achieve the impossible witthin Excel 2003

Thanks in anticipation


dave caizley

Concatenate data that includes dates
 
Hi Max

I tried it once again outside of my worksheet and it does in fact seem to
work. I think I just need to clear the standard date formatting from my
worksheet and accept what is in the formula. Thanks for the help

"Max" wrote:

Think you can use TEXT to specify the format

Eg, in C2: =A2&" "&TEXT(B2,"dd-mmm-yyyy")
where B2 contains the date data in the concat

Adapt the format to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dave caizley" wrote:
I have a workbook that provides for a cell to have a date entered as part of
the approval process. I then want to include that date cell in a
concatenation with two otther cells to form a file name and then possibly by
way of a macro to copy and paste special that data so that it forms a text
string that someone can paste into an e-mail heading.

Every way I have tried it, the date always reverts to its core number format.

Am I trying to achieve the impossible witthin Excel 2003

Thanks in anticipation


Max

Concatenate data that includes dates
 
It should work as long as B2 contains a real date.

Maybe try it with a little coercion on B2:
=A2&" "&TEXT(B2+0,"dd-mmm-yyyy")

To clarify the line:
Adapt the format to suit

actually means that you could adapt the date format suggested within the
TEXT to another that's actually desired in the concat string. It also doesn't
have to be the same date format as that in the source B2.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dave caizley" wrote:
Hi Max

Thanks for the response. I wasnt aware of that method of concatenation so I
have learnt something. However, Excel wouldnt accept the formula. I have
tried to reformat the cell so that it gives that same date format as your
formula but it still wouldnt accept it.



Max

Concatenate data that includes dates
 
welcome. pl also see clarification posted to your earlier response.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"dave caizley" wrote in message
...
Hi Max

I tried it once again outside of my worksheet and it does in fact seem to
work. I think I just need to clear the standard date formatting from my
worksheet and accept what is in the formula. Thanks for the help





All times are GMT +1. The time now is 02:59 PM.

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