0
votes

I have date format like "MM-dd-YYYY" in Excel file. I would like to know if how can I sort it by month and year ?

Because when I sort, the 'year' doesn't work when we have different year like '2017' '2018'.

Thanks

1
Format the cells as date and then sort it.Vityata
You could add 2 hidden columns. One with year, the other with month. Then do your sort based on these. Alternatively you could have one hidden column containing date vale (as days) and sort by thisMiguelH

1 Answers

2
votes
  1. Convert your data to proper date format first. to do so perfom following steps:-

a.Simply select your dates in column A > Data tab of the ribbon > Text to Columns to open the Wizard:

Step 1 of the Wizard: Choose ‘Delimited’ Step 2 of the Wizard: uncheck all Delimiters (just to be safe) Step 3 of the Wizard: Choose 'Date' from the 'Column Data Format' options and choose your date format from the drop down list , and click the Finish button:

Tip: Note how the ‘Date’ drop down list above has many different combinations of D M Y, you simply choose what order your dates are formatted in from the list.

now sort your data and it will work as you want it to.

Check here for more: