ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I concatenate two columns when one is in date format? (https://www.excelbanter.com/excel-discussion-misc-queries/42815-how-do-i-concatenate-two-columns-when-one-date-format.html)

LauraL

How do I concatenate two columns when one is in date format?
 
I am trying to combine two columns using =concatenate. One of them is a
column of dates. When I execute the formula the returned value changes my
date into a text number. How do i maintain the date value?

Dave O

Within the CONCATENATE() function, instead of referring to the date
cell alone, refer to it by nesting the TEXT() function. For instance:
if your date cell is A1 and you're concatenating it with cell B1, your
formula would look something like this:
=CONCATENATE(TEXT(A1,"mm/dd/yyyy"),B1)

You may need to change the arguments of the TEXT function to fit your
specific application.


Bob Phillips

=A1&TEXT(B1,"dd mmm yyyy")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"LauraL" wrote in message
...
I am trying to combine two columns using =concatenate. One of them is a
column of dates. When I execute the formula the returned value changes my
date into a text number. How do i maintain the date value?




LauraL

Thanks, this works perfectly.

"Dave O" wrote:

Within the CONCATENATE() function, instead of referring to the date
cell alone, refer to it by nesting the TEXT() function. For instance:
if your date cell is A1 and you're concatenating it with cell B1, your
formula would look something like this:
=CONCATENATE(TEXT(A1,"mm/dd/yyyy"),B1)

You may need to change the arguments of the TEXT function to fit your
specific application.




All times are GMT +1. The time now is 03:07 AM.

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