#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Combining two dates

I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Combining two dates

Just saying that the equations "dont work" is not a very helpful description
if you want help in solving your problems.
If you tell us what formula you used, what values were in the cells leading
into the formula, what result you got, and what result you expected, that
would be a good start.

One likely problem area if you are playing with dates is the question as to
whether the cells contain numbers formatted as dates or whether they contain
text. You can check this in a number of ways. One option is to use
=ISTEXT(D4) and =ISNUMBER(D4). Another option is to try Format/ Cells/
Number/ Date to see whether the cell can be changed from 26-Apr to display
temporarily in a different format such as 26/4/08 or 26 April 2008; if it
doesn't change, you're starting with text, but if it does change it is a
number formatted as text.

Having resolved the question above, if you have a number formatted as text
and you want to use it in a concatenation formula, you'll presumably want to
use the TEXT function to format it the way you want it.
So =CONCATENATE(D4,", ",E4) might become =CONCATENATE(TEXT(D4,"dd-mmm"),",
",E4)
or =D9&", "&E9 might become =TEXT(D9,"dd-mmm")&", "&E9
Change the formatting string "dd-mmm" to suit how you want the number
presented.
--
David Biddulph

"RyanR8881" wrote in message
...
I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,819
Default Combining two dates

What do the results actually look like and what is really in D4 and E4?

RyanR8881 wrote:

I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Combining two dates

If the values in column D are not Text, then try:

=DATE(YEAR(E1),MONTH(D1),DAY(D1))


--
Gary''s Student - gsnu200808


"RyanR8881" wrote:

I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 542
Default Combining two dates

It can be done, it's long winded but works
First I made a lookup table on sheet 2
1 Jan
2 Feb
3 Mar
4 Apr
5 May
6 Jun
7 Jul
8 Aug
9 Sep
10 Oct
11 Nov
12 Dec
Then used this formula to get the results you need.
CONCATENATE(DAY(A1),"-",VLOOKUP(MONTH(A1),Sheet2!A$1:B$12,2),"-",B1)
With A1 containing your date and B1 the year. The problem came with the
month thus the lookup table.
Hope this helps.


"RyanR8881" wrote:

I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6
Default Combining two dates

I found the answer: =DATEVALUE(LEFT(A1,6) & "," & RIGHT(A1,5))



"James" wrote:

It can be done, it's long winded but works
First I made a lookup table on sheet 2
1 Jan
2 Feb
3 Mar
4 Apr
5 May
6 Jun
7 Jul
8 Aug
9 Sep
10 Oct
11 Nov
12 Dec
Then used this formula to get the results you need.
CONCATENATE(DAY(A1),"-",VLOOKUP(MONTH(A1),Sheet2!A$1:B$12,2),"-",B1)
With A1 containing your date and B1 the year. The problem came with the
month thus the lookup table.
Hope this helps.


"RyanR8881" wrote:

I need to combine two columns. One column has the day and month, the other
column has the year. The CONCATENATE(D4,", ",E4) equation and the =D9&",
"&E9 equations dont work

again, it looks like this
l 26-Apr l 2007 l
l 27-Apr l 2007 l
l 28-Apr l 2007 l

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
how do I sort a column of random dates into Consecutive dates Rob Gibson Excel Worksheet Functions 2 June 12th 07 05:10 AM
Identifying unique dates within a range of cells containing dates cdavidson Excel Discussion (Misc queries) 0 October 12th 06 08:19 PM
combining 2 dates into 1 cell LT GLM Excel Worksheet Functions 3 March 31st 06 04:56 PM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
Charting data against dates where dates are not at fixed intervals PK Charts and Charting in Excel 4 June 16th 05 05:08 AM


All times are GMT +1. The time now is 04:27 PM.

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

About Us

"It's about Microsoft Excel"