Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Merging Date Columns

I have two columns that I want to merge into one. The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. Is there a way to merge the two together? I have tried the
CONCATENATE and the merge functions without success. I am a fairly
novice/infrequent user of Excel.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Merging Date Columns

If you select any cell in the column containing entries like "21-Aug" and
look at the formula bar, you will probably find its a Date and already has a
year attached to it... the current year. If it is possible that this
column's year is not the correct one, you can do this to join its month and
day with your other column's year value. Assuming your "first column" is A
and your "second column" is B....

=DATE(B1,MONTH(A1),DAY(A1))

Rick


wrote in message
...
I have two columns that I want to merge into one. The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. Is there a way to merge the two together? I have tried the
CONCATENATE and the merge functions without success. I am a fairly
novice/infrequent user of Excel.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,358
Default Merging Date Columns

Is your first column text? Or is it a date. If it is a date, then it already
has a year, and you could use the following formula:
=DATE(B2,MONTH(A2),DAY(A2))
If it is text, and only has 21-Aug entered, AND assuming that any dates are
entered with a number, followed immediately by a - (dash), followed
immediately by a 3 letter month abbreviation, you could use the following
formula:
=DATE(B2,TEXT(A2,"m"),LEFT(A2,FIND("-",A2)-1))

Hope this helps.

--
John C


" wrote:

I have two columns that I want to merge into one. The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. Is there a way to merge the two together? I have tried the
CONCATENATE and the merge functions without success. I am a fairly
novice/infrequent user of Excel.

Thanks.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Merging Date Columns

=DATE(B2,MONTH(A2),DAY(A2))

That is the same formula (except for the row) that I posted. I just tested
it when the "21-Aug" is Text and the formula still worked correctly
(apparently Excel converts it to a date due to its being called by a
function requiring a date argument)... so your second formula appears not to
be needed... it looks like this one formula works in both cases.

Rick


"John C" <johnc@stateofdenial wrote in message
...
Is your first column text? Or is it a date. If it is a date, then it
already
has a year, and you could use the following formula:
=DATE(B2,MONTH(A2),DAY(A2))
If it is text, and only has 21-Aug entered, AND assuming that any dates
are
entered with a number, followed immediately by a - (dash), followed
immediately by a 3 letter month abbreviation, you could use the following
formula:
=DATE(B2,TEXT(A2,"m"),LEFT(A2,FIND("-",A2)-1))

Hope this helps.

--
John C


" wrote:

I have two columns that I want to merge into one. The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. Is there a way to merge the two together? I have tried the
CONCATENATE and the merge functions without success. I am a fairly
novice/infrequent user of Excel.

Thanks.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Merging Date Columns

It depends to some extent whether you've got text in your cells, or dates
formatted in a particular way.
If your 21-Aug is text, you could try =A2&"-"&B2 if you want output as text,
or =--(A20&"-"&B20) and format as a date if you want Excel to treat it as a
date.
If column A contains a date from which you aren't displaying the year, and
you want to ignore the undisplayed year and replace it by 2003 from column
B, try =DATE(B2,MONTH(A2),DAY(A2)).
--
David Biddulph

wrote in message
...
I have two columns that I want to merge into one. The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. Is there a way to merge the two together? I have tried the
CONCATENATE and the merge functions without success. I am a fairly
novice/infrequent user of Excel.

Thanks.





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Merging Date Columns

On Aug 21, 10:09*am, "Rick Rothstein \(MVP - VB\)"
wrote:
=DATE(B2,MONTH(A2),DAY(A2))


That is the same formula (except for the row) that I posted. I just tested
it when the "21-Aug" is Text and the formula still worked correctly
(apparently Excel converts it to a date due to its being called by a
function requiring a date argument)... so your second formula appears not to
be needed... it looks like this one formula works in both cases.

Rick

"John C" <johnc@stateofdenial wrote in message

...



Is your first column text? Or is it a date. If it is a date, then it
already
has a year, and you could use the following formula:
=DATE(B2,MONTH(A2),DAY(A2))
If it is text, and only has 21-Aug entered, AND assuming that any dates
are
entered with a number, followed immediately by a - (dash), followed
immediately by a 3 letter month abbreviation, you could use the following
formula:
=DATE(B2,TEXT(A2,"m"),LEFT(A2,FIND("-",A2)-1))


Hope this helps.


--
John C


" wrote:


I have two columns that I want to merge into one. *The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. * Is there a way to merge the two together? *I have tried the
CONCATENATE and the merge functions without success. *I am a fairly
novice/infrequent user of Excel.


Thanks.- Hide quoted text -


- Show quoted text -


You guys are awesome, thanks for all of the help. It worked like a
charm!
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Merging Date Columns

On Aug 21, 9:57*am, John C <johnc@stateofdenial wrote:
Is your first column text? Or is it a date. If it is a date, then it already
has a year, and you could use the following formula:
=DATE(B2,MONTH(A2),DAY(A2))
If it is text, and only has 21-Aug entered, AND assuming that any dates are
entered with a number, followed immediately by a - (dash), followed
immediately by a 3 letter month abbreviation, you could use the following
formula:
=DATE(B2,TEXT(A2,"m"),LEFT(A2,FIND("-",A2)-1))

Hope this helps.

--
John C



" wrote:
I have two columns that I want to merge into one. *The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. * Is there a way to merge the two together? *I have tried the
CONCATENATE and the merge functions without success. *I am a fairly
novice/infrequent user of Excel.


Thanks.- Hide quoted text -


- Show quoted text -


Thanks, you guys are great!
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Merging Date Columns

On Aug 21, 10:20*am, "David Biddulph" <groups [at] biddulph.org.uk
wrote:
It depends to some extent whether you've got text in your cells, or dates
formatted in a particular way.
If your 21-Aug is text, you could try =A2&"-"&B2 if you want output as text,
or =--(A20&"-"&B20) and format as a date if you want Excel to treat it as a
date.
If column A contains a date from which you aren't displaying the year, and
you want to ignore the undisplayed year and replace it by 2003 from column
B, try =DATE(B2,MONTH(A2),DAY(A2)).
--
David Biddulph

wrote in message

...



I have two columns that I want to merge into one. *The first column is
as month day column 21-Aug and the second column is a year column, ie
2003. * Is there a way to merge the two together? *I have tried the
CONCATENATE and the merge functions without success. *I am a fairly
novice/infrequent user of Excel.


Thanks.- Hide quoted text -


- Show quoted text -


Thanks for the help! You guys are great!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Columns Titanium Excel Worksheet Functions 13 May 31st 10 09:36 PM
Merging Two Columns abs Excel Discussion (Misc queries) 3 May 20th 08 04:04 PM
Merging separate date and time columns into one Gadgets Excel Discussion (Misc queries) 5 July 26th 06 09:24 PM
Merging columns daarun New Users to Excel 1 November 21st 05 07:31 PM
merging columns - one date, one time batfish Excel Worksheet Functions 2 October 28th 05 04:02 AM


All times are GMT +1. The time now is 10:35 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"