how to arrange in ascending order
-
Hi, guys. I have a doubt: there is how to arrange in increasing order the months and years?
https://1drv.ms/i/s!AjClnevQ_1BJg7ly2EvPzDLZ00GTQQThankssss
-
Edit > Line Operations > Sort Lines As Integers Ascending
-
Hello Neto Bezerra and Binnu Jesudasan Gudapati,
Binnu, I don’t think that’s exactly the sorted list of dates that would like Neto ! Indeed, from the original example list of dates, below :
11/2011 04/2013 08/2012 01/2011 05/2014 03/2013 10/2012if we perform the sort Edit > Line Operations > Sort Lines As Integers Ascending, we obtain :
01/2011 03/2013 04/2013 05/2014 08/2012 10/2012 11/2011It’s easy that this list is not sorted by year :-(( But you can easily sort a list of dates, if your remember one important rule :
Write the different items of the date, from
lefttoright, from theless frequentlychanged item to themore frequentlychanged itemIn our case, as years changed less frequently than months, we must re-organize the list, according to the template
year/month. To do so, just use the following S/R, in Regular expression mode :SEARCH :
(\d+)/(\d+)REPLACE :
\2/\1or$2/$1Therefore, from the original example, above, we get, after the S/R, the new list :
2011/11 2013/04 2012/08 2011/01 2014/05 2013/03 2012/10Finally, we perform the classical sort Edit > Line Operations > Sort Lines
LexicographicallyAscending, to obtain the well-sorted list ( to my mind ! ), below :2011/01 2011/11 2012/08 2012/10 2013/03 2013/04 2014/05Best Regards,
guy038
-
Perhaps the OP needs the data to be in the
MM/YYYY
format after the sort.Simply performing again guy038’s regex search and replace will do that.
-
Hi Scott,
Oh yes ! I forgot that final point ! Thanks for your reply !
guy038
-
Thanks so much, guys!!!
-
Guys, there is a possibility to put some kind of marking or space for when happening a break in the sequence?
Example:2011/03
2011/04
2011/052011/07
2011/082012/01
2012/02Thank you very much in advance!!
-
You need to do some programming in order to achieve that.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login