Sorting data in Excel is considered one of the key components in data analysis because it allows your data to be structured and organised. Once your data is organised, it is much easier to make sense of it and work with. There are various ways to sort data. For example, you can sort in alphabetical or numerical order. In this post, I will show you how to sort by date in Excel.
Sorting data by dates is a really helpful feature in Excel. For instance, you may want to sort to track sales by date or view your weekly, monthly and yearly transactions in order.
I will show you three different methods on how to sort by date in Excel. These are by using:
- Excel’s custom sort dialog box
- The Excel ribbon
- Right-clicking the mouse button
In all of the above methods, I will sort the dates by newest through to the oldest dates.
Excel’s Custom Sort Dialog Box
If your data has headings, then you can use them as categories to sort the data. You can do this by using the custom sort feature in Excel. Custom sort allows you to sort by multiple columns which therefore gives you greater flexibility.
In the dataset above, there is a list of products sold in an electrical store. I want to sort the data by the most recent payment received date. To do this, follow these steps.
- Select the whole dataset. In this example I select the range A1:C7.
- From the ribbon, click on the Home tab. Under the Editing group click on the Sort & Filter button. A shortcut menu will appear. Click on Custom Sort from the menu.
- The Sort dialog box will appear. I want to sort by payment received date, so I select Payment Received Date from the drop-down box in the Sort by field. I want to sort the dates by the most recent dates through to the oldest dates, so I select Newest to Oldest in the Order field. If you want to sort the dates from oldest to newest, then simply choose Oldest to Newest. Next press the OK button.
- The data is now sorted by the most recent dates at the top through to the oldest dates at the bottom.
Sort by Dates using the Excel Ribbon
Another way you can sort dates in Excel is by using the Excel ribbon. To do this, follow these steps.
- Click on any cell which contains a date. In this example, I select cell B3.
- From the Excel ribbon, click on the Home tab and under the Editing group, click on the Sort & Filter button. Another menu will appear and from there click on Sort Newest to Oldest to sort the data from the newest dates through to the oldest. You can also click on Sort Oldest to Newest if you want the oldest dates at the top through to the newest dates at the bottom.
You can sort the dates by clicking on the Home tab from the ribbon and selecting the Sort & Filter button
- The data is now sorted by the newest dates at the top and the oldest dates at the bottom.
An alternative way to sort by date in Excel using the ribbon is by clicking on the Data tab. Under the Sort & Filter group you can click on the Sort Oldest to Newest or Sort Newest to Oldest buttons, depending on how you want to sort. Remember to click on a cell with a date first.
How to Sort by Date in Excel using the Right-Click button on the Mouse
Another method to sort dates in Excel is by using the right-click button on your mouse.
To do this, click on any cell which contains a date. Right-click your mouse and then from the menu, hover your mouse over Sort. Another menu will appear and from there you can select either Sort Oldest to Newest or Sort Newest to Oldest, depending on how you want to sort the dates.
Sorting the dates as shown in the above methods will always order your dates by year first, then by month, and then finally by day.
Learn More on How to Sort in Excel
There are various ways on how to sort in Excel. I have written a very comprehensive Microsoft Excel book which details the different ways on how data can be sorted. This Excel book will teach you everything you need to know about Excel which will enable you to increase productivity, save time and increase your salary.
To learn more about this book and to purchase it from Amazon, then simply click one of the buttons below. Alternatively, you can click here.
I hope you enjoyed this tutorial on how to sort by date in excel. If you have any questions or feedback then please leave a comment below.