Sorting helps you organize your data into a specific order based on column data. There are two ways to sort a view, a quick sort from the view itself, and a more flexible and persistent sort created in a view. When you sort, you are only rearranging how the data is displayed, not adding or removing content that is displayed in the view.
Sort data from within a view
In any view, select the header of a column of a list or library and select a sort.
You can choose any column to sort, but only one column at a time. When you close the list or library, the column will return to its default view order unless you save the view.
Create a sorted view
When you create or edit a view, you can specify sorting on one or two columns. You can sort on columns, even if they're not visible in the view. To set up a sort, follow these steps:
Do one of the following:
To Create a view
In SharePoint Online, select Switch view options, Save view as and enter a name. The sort you've selected is saved with the view.
In SharePoint Server, click the Library tab, and then click Create view.
On the create or edit a view page, scroll down to Sort. In the Sort section, select the First sort by the column drop down and choose a field. This field is one of the many available columns for your list or library, and can be one that is in the view or not.
Select Show the items in ascending order or Show the items in descending order.
Scroll to the top or bottom of the page and select OK.
Modify a sorted view
To Edit a view
Open the list or library.
In SharePoint Online, select Switch view options, and then Edit current view.
In SharePoint Server, click the Library tab, and then click Modify view.
Scroll down to the Sort section.
You can then change settings as outlined in steps 2 through 5 in the Create a sorted view procedure above.
Filter and group your sorted data view
You can combine sorting with a filtered and/or a grouped view. Grouping allows you to collapse sorted areas under headers, and filtering can be used to narrow down a large list of items.
To see how to group data in a view, see Use grouping to modify a SharePoint view.
To learn how to filter data in a view, see Use filtering to modify a SharePoint view.