Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old May 3rd 09, 06:15 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: May 2009
Posts: 2
Default Date formatting for sorting - followup

I tried formatting with a created "Custom" format of "yyyy-mm-dd" and
that works EXCEPT, it doesn't affect dates before 1900. Why wouldn't it,
and how can I get it to affect all dates?



  #2   Report Post  
Old May 3rd 09, 06:53 PM posted to microsoft.public.excel.newusers
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default Date formatting for sorting - followup

Excel doesn't like dates before 1900.

So those entries that look like dates (but are before 1900) aren't really dates.

You may be able to use:

=if(isnumber(a1),text(a1,"yyyymmdd"),someotherexpr ession)

But that other expression would depend on how those text entries looked.

Some combination of =mid(), =right() and/or =left() may do it for you.

12/25/1850
could be
=IF(ISNUMBER(A1),TEXT(A1,"yyyymmdd"),MID(A1,7,4)&L EFT(A1,2)&MID(A1,4,2))


- Butch wrote:

I tried formatting with a created "Custom" format of "yyyy-mm-dd" and
that works EXCEPT, it doesn't affect dates before 1900. Why wouldn't it,
and how can I get it to affect all dates?


--

Dave Peterson


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
Sorting Columns Independently Followup From 3/13 curtc.[_2_] Excel Discussion (Misc queries) 2 March 23rd 09 02:21 PM
Date Formatting & Sorting Irfan Khan[_2_] Excel Discussion (Misc queries) 2 April 4th 08 06:00 PM
Followup: Folder listing [email protected] Excel Discussion (Misc queries) 1 February 23rd 07 02:23 AM
Formatting Date for Sorting KP Excel Discussion (Misc queries) 2 September 18th 06 05:10 PM
countif followup Lee Harris Excel Worksheet Functions 3 November 16th 05 06:13 AM


All times are GMT +1. The time now is 05:15 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017