Datasets often contain many types of data. For example, some datasets include names, location, values, and time. If you don’t clean and organize a dataset, you may struggle to make sense of its contents. Sorting helps you make sense of the data.
You can sort the data by name, rank, or any other criteria. This article will show you two simple methods of sorting data by date.
2 methods of sorting data by date in Microsoft Excel
- Sorting by date using the Format option
- Sorting by formatting dataset as a table
We will explain how to apply either method in a few simple steps.
Let us begin!
Method #1: Sorting by Date Using the Format Option
This method is useful if you only wish to execute one simple function, and that is to have the dates in a specific order.
Step 1: Select the date column
In your spreadsheet, select the column containing dates by clicking on the alphabet letter above the column.
In the example below, you would click on C to select the whole column, which will then color the column a shade darker to show that it has been selected.
Step 2: Set the format of the date column to date
Even though it might appear as if your column contains dates, it is very important also to ensure that the format of the whole column is set to date.
Set the format of the date column to date by doing the following:
- Anywhere in this selected area in your column, right-click with your mouse.
- From the menu that appears, select ‘Format Cells’.
- Select the Number tab.
- Now check if the selection Date is highlighted.
- Click on the OK button at the bottom to exit this screen.
Step 3: Select Sort
While your column is still selected, click on the Data tab in the top menu bar.
After clicking on Data, select Sort from the ribbon.
Once you click on Sort a warning window will pop up.
In the pop-up warning window, check the radio button for ‘Expand the selection.’
Next, click on the button Sort…
Step 4: Sort by date
The Sort window will now open with various options.
Next to the ‘Sort by’ option, click the drop-down arrow and select Date.
Step 5: Select Order
Set the order in which you want your date fields to be sorted. To do that, under the ‘Order’ option, click the arrow which will open a dropdown window.
Select how you want the dates sorted, for example – Oldest to newest.
Finally, click the OK button.
Method #2: Sorting by Formatting Dataset as a Table
This method is useful if you wish to start with sorting the dates in a specific order, and then do more sorting and cleaning up of your dataset. Once a filter is applied to the whole table, additional sorting options are easy to apply.
Step 1: Select the columns
Select all the columns in your table by clicking on the A in the heading row, and dragging your mouse to the last alphabet letter above your last column.
In our example, it is A to C.
Step 2: Select Format as Table
In the top ribbon, look for the ‘Format as Table’ option.
Next, you will get a pop-up menu.
Ensure the ‘My table has headers’ checkbox is ticked.
Finally, click on the OK button.
Step 3: Applying the filter to sort the dates
Next to every title in your table there will now be a small square with a downward pointing triangle. This is the filter icon.
Clicking on the Filter icon will give you a drop-down menu.
Select the Filter icon of your Date column, and a drop down menu will appear.
You can now select ‘Sort Oldest to Newest’ or ‘Sort Newest to Oldest’
Finally, click on the OK button.
This will sort the data by date and as per the option selected.
Wrapping Up
Sorting your data by date is easy and a nice way to make sense of your data. If you follow any of the methods above, you will get it done in a few seconds. In addition, sorting data by date keeps your work tidy and organized.
Also, you may need to analyze or visualize your data further. Applying a filter to sort data by date is a great way to begin your analysis.
Thank you very much.
With best wishes.
Sonja