ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sorting Dates (https://www.excelbanter.com/excel-discussion-misc-queries/185019-sorting-dates.html)

Pammy

Sorting Dates
 
When I sort dates, they are sorting in order. The format is a date format
03/01/05.
When I choose assending order, they start out ok, but then get mixed up:
3/01/05 - 03/06/05, 03/02/05, and even the end 05/01/04,any idea?

Dave Peterson

Sorting Dates
 
Your dates aren't what you think they are.

They could be completely different:
05/01/04 could be May 1, 2004 or January 5, 2004 or January 4, 2005.

Or they could be plain old text (that look like dates).

I'd select that range and give it a nice unambiguous date format, like:
mmmm dd, yyyy

And see what your data shows.

The values that are text won't change--you'll still see 03/06/05.

ps.
If this is a single cell: 3/01/05 - 03/06/05
then it's not a date--it's a string and will sort in plain old alphanumeric
order.

If you want to sort in date order, you'd be better off by putting the start and
end dates in different columns--and use real dates.

Pammy wrote:

When I sort dates, they are sorting in order. The format is a date format
03/01/05.
When I choose assending order, they start out ok, but then get mixed up:
3/01/05 - 03/06/05, 03/02/05, and even the end 05/01/04,any idea?


--

Dave Peterson

David Biddulph[_2_]

Sorting Dates
 
03/01/05 is an ambiguous format. Format the cells as something unambiguous,
like dd mmm yyyy, and then you'll see what dates you are really dealing
with.
--
David Biddulph

"Pammy" wrote in message
...
When I sort dates, they are sorting in order. The format is a date format
03/01/05.
When I choose assending order, they start out ok, but then get mixed up:
3/01/05 - 03/06/05, 03/02/05, and even the end 05/01/04,any idea?





All times are GMT +1. The time now is 09:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com