Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ket
 
Posts: n/a
Default Convert text to dates

Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London
  #2   Report Post  
NHarkawat
 
Posts: n/a
Default

No direct formula but you can try his after a couple of steps
create in a separate area a table with 1st column January,feb...thru
december and against each ones type 1, 2 ..thru 12
use this formula in col C assuming col A has "January" and col B has "11th"
=DATE(2004,VLOOKUP(A1,$I$1:$J$12,2,0),LEFT(B1,SUMP RODUCT(--ISNUMBER(-LEFT(B1
,ROW(INDIRECT("1:2")))))))
Since year was not given I assumed 2004 and assumed cell I1 thru J12
contains the table I told you to create in 1st step


"Ket" wrote in message
...
Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London



  #3   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

For row 2
=DATE(2004,MATCH(A2,{"January","February","March", "April","May","June","July
","August","September","October","November","Decem ber"},0),SUBSTITUTE(SUBSTI
TUTE(SUBSTITUTE(SUBSTITUTE(B2,"st",""),"nd",""),"r d",""),"th",""))


Arvi Laanemets


"Ket" wrote in message
...
Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London



  #4   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Wed, 03 Nov 2004 17:03:02 +0000, Ket wrote:

Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London



=--(A1&" "&LEFT(B1,LEN(B1)-2))

or

=--(LEFT(B1,LEN(B1)-2)&" "&A1)

Of course, since the year is unspecified, it will always default to the current
year.




--ron
  #5   Report Post  
Ket
 
Posts: n/a
Default

Arvi,

Thanks, this worked very well. Can make use of your knowledge one more
time?
What happens if August, Setember,October, November,and December are
2004 and january, February are 2005. How should this formula be
adjusted?

Thanks again.

On Wed, 3 Nov 2004 19:45:10 +0200, "Arvi Laanemets"
wrote:

Hi

For row 2
=DATE(2004,MATCH(A2,{"January","February","March" ,"April","May","June","July
","August","September","October","November","Dece mber"},0),SUBSTITUTE(SUBSTI
TUTE(SUBSTITUTE(SUBSTITUTE(B2,"st",""),"nd","")," rd",""),"th",""))


Arvi Laanemets


"Ket" wrote in message
.. .
Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London





  #6   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

For interval from August 2004 to July 2005 (or to February 2005, it's the
same) the formula is:
=DATE(2004+(MATCH(A2,{"January","February","March" ,"April","May","June","Jul
y","August","September","October","November","Dece mber"},0)<8),MATCH(A2,{"Ja
nuary","February","March","April","May","June","Ju ly","August","September","
October","November","December"},0),SUBSTITUTE(SUBS TITUTE(SUBSTITUTE(SUBSTITU
TE(B2,"st",""),"nd",""),"rd",""),"th",""))

Arvi Laanemets


"Ket" wrote in message
...
Arvi,

Thanks, this worked very well. Can make use of your knowledge one more
time?
What happens if August, Setember,October, November,and December are
2004 and january, February are 2005. How should this formula be
adjusted?

Thanks again.

On Wed, 3 Nov 2004 19:45:10 +0200, "Arvi Laanemets"
wrote:

Hi

For row 2


=DATE(2004,MATCH(A2,{"January","February","March" ,"April","May","June","Jul

y

","August","September","October","November","Dece mber"},0),SUBSTITUTE(SUBST

I
TUTE(SUBSTITUTE(SUBSTITUTE(B2,"st",""),"nd","")," rd",""),"th",""))


Arvi Laanemets


"Ket" wrote in message
.. .
Hello,

I am using Windows XP with Office XP. I have two columns. Column A
contains months of the year in the format January, March December etc.
Column B contains dates in the format 11th, 16th, 20th etc.
Is it possible to combine these two cells to produce a date? Can a
sort then be undertaken on this new date column so that all
information is sorted chronologically?
I tried using concatenate to combine the cells but couldn't get them
to be recognised as dates.
Thanks in advance for all your assistance.

Ket
London





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
Convert text to numbers gennario Excel Discussion (Misc queries) 6 January 11th 05 12:56 AM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:55 AM
convert a column of text to proper Harvey New Users to Excel 4 December 17th 04 03:25 PM
how do I easily convert a single column of text (multiple rows si. philmah Excel Discussion (Misc queries) 2 December 16th 04 01:24 AM
Convert text file to MS_Excel Aqua Flow Excel Discussion (Misc queries) 1 November 30th 04 03:55 AM


All times are GMT +1. The time now is 11:36 AM.

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"