• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

how to sort data by ascending order of date?

Select the data including the header row
Goto Data, Sort
Select the Date field, select Ascending
 
thanks ,but i am working on excel 2007 and in sort option i get only a-z or z-a option and custom sort option..:O
 
Hi ,

Basically , though we may think Dec'14 is a month or even a date , Excel will take it as a string.

Thus , when sorting a column containing text strings , the only possibility is an alphabetical sort.

Sorting by months is not possible in this data since the real sort is by date , or by year and then month.

Hence we need to convert a text string such as Dec'14 to a date so that it is recognized by Excel.

One such date format is mmm-yy ; to convert the input string to this format , we replace the single quote ' by a hyphen ; this we do by the formula :

=SUBSTITUTE(A2,"'","-")

However , if you stop at this , then when you sort , you will have to select the option :

Sort anything that looks like a number , as a number

If you modify the formula to return a number , then Excel will not prompt you with the above option ; hence the formula is :

=SUBSTITUTE(A2,"'","-") + 0

Narayan
 
Dates are simply numbers,

A-Z means ascending
Z-A means descening
 
Back
Top