Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Sorting row by date.

Is there a way to sort a row by date but the date is set up such that
it goes DD/MM/YYYY? Is the main question? I'm not sure if this is
possible.

Basically the date is link to data in the rows example
Date Average Mean
10/9/2008 4.34 4.2
10/7/2007 3 3.1
10/28/2008 5 5.4
So basically sort that by date.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Sorting row by date.

Dates are number that are formated to look like a string Date. As long as
the dates are Not strings there should be no problems. To verify you have
dates clciik ona cell and then go to worksheet menu Format - Cells - Number
and check that a date format is highlighted.

The only problem you may encounter is that dates with hidden Hours and
minutes will sort in sequence includiing the hours and minutes.

Time is stored as a number with 1 = 1/1/1900. each day is = 1. So 2 =
1/2/1900. An hour = 1/24 starting at midnight. So 8:00 AM = 8/24 = 1/3 =
..3333. 1/1/1900 8:00 AM = 1.33333333333. Minutes are 1/(24 * 60). Seconds
are 1/(24 * 60 * 60).

If the number is 1.333333 (1/1/1900 8:00 AM) and the format for the cell is
showing only Month, day, Year you will not see the hours and minutes but the
number is still 1.333333. If the Date is 1.666666 (1/1/1900 2:00 PM) the
8:00 AM will appear before the 2:00 PM even though you only see the Date
(Month, Day, year). so if you had

John 1/1/1900 8:00 AM
Mary 1/1/1900 2:00 PM

and your sorted using two keys Date first, Name Second you would get

Mary 1/1/1900 (=1.33333)
John 1/1/1900 (=1.66666)

The dates wouild appear identical but are not)


" wrote:

Is there a way to sort a row by date but the date is set up such that
it goes DD/MM/YYYY? Is the main question? I'm not sure if this is
possible.

Basically the date is link to data in the rows example
Date Average Mean
10/9/2008 4.34 4.2
10/7/2007 3 3.1
10/28/2008 5 5.4
So basically sort that by date.

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 a date by month, date and then year. drosh Excel Discussion (Misc queries) 3 May 30th 08 01:57 AM
Date Sorting JayMan Excel Programming 2 November 19th 07 06:26 PM
Date Sorting JayMan Excel Worksheet Functions 2 November 19th 07 06:25 PM
Sorting by date when the date isn't exact Kim Excel Discussion (Misc queries) 1 May 5th 05 10:44 PM
Sorting by date Simon Lloyd[_575_] Excel Programming 0 October 5th 04 10:59 AM


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