LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Sorting date and non "date"

I have a column of dates, some of which are valid dates in excel
(6/1/1900) and others which are not whole dates or valid (1/31/ (always
has a trailing '/') or 1/31/1899)

I would like to create a new column with the text of these dates so
that I can sort based on this new mixed date column.

If I have a serialized date, I will just use =TEXT(<cell,"yyyy/mm/dd")

If all my non serialzed dates where fixed length, I could use:
=IF(LEN(J4)6,RIGHT(J4,4)," ")&"/"&MID(J4,4,2)&"/"&LEFT(J4,2)

But, some of my months and days are entered as 1,2,3 while others are
entered as 01,02,03.

So, how can I tell if I have a serializable date vs general, and how
can I make the above concatenation work for variable length
months/days?

Thanks

 
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



All times are GMT +1. The time now is 01:40 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"