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/99968-sorting-dates.html)

Murray

Sorting Dates
 
I have a list which has a date column. I want to sort ascending order but I
want the sort order to reflect my financial year: 2 Feb to 2 Feb rather than
from 1 Jan to 31 Dec. How can I specify my own date order rather than the
default?

Cheers

VBA Noob

Sorting Dates
 

You could add another column and enter this formula

=CHOOSE(TEXT(A1,"m"),12,1,2,3,4,5,6,7,8,9,10,11)

This will enter 1 for the month of Feb, 2 for the month of March and so
on.

Then sort by the new column

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562611


Murray

Sorting Dates
 
This is great and works for the months. Any way I can get the days to be
included in the sort?

"VBA Noob" wrote:


You could add another column and enter this formula

=CHOOSE(TEXT(A1,"m"),12,1,2,3,4,5,6,7,8,9,10,11)

This will enter 1 for the month of Feb, 2 for the month of March and so
on.

Then sort by the new column

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile: http://www.excelforum.com/member.php...o&userid=33833
View this thread: http://www.excelforum.com/showthread...hreadid=562611



Peo Sjoblom

Sorting Dates
 
1. You don't need a complicated formula to get the index numbers of the
month (I can't see the original post)

=MONTH(A1)

will give you the same numbers without having the workbook being volatile

use a third column and

=DAY(A1)

then select all 3 columns, then sort by first month help column, then the
day help column and finally the original column



--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com



"Murray" wrote in message
...
This is great and works for the months. Any way I can get the days to be
included in the sort?

"VBA Noob" wrote:


You could add another column and enter this formula

=CHOOSE(TEXT(A1,"m"),12,1,2,3,4,5,6,7,8,9,10,11)

This will enter 1 for the month of Feb, 2 for the month of March and so
on.

Then sort by the new column

VBA Noob


--
VBA Noob
------------------------------------------------------------------------
VBA Noob's Profile:
http://www.excelforum.com/member.php...o&userid=33833
View this thread:
http://www.excelforum.com/showthread...hreadid=562611






All times are GMT +1. The time now is 11:45 AM.

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