Sorting helps you organize your data into a specific order based on column data. When you sort, you are only rearranging how the data is displayed, not adding or removing content that is displayed in the view.
There are two ways to sort a view:
Sort data quickly 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:
On the menu bar near the top right, select Switch view options >Save view as and enter a name:
(The sort you've selected is saved with the 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
Open the list or library.
Select Switch view options, and then Edit current view.
Scroll down to the Sort section.
You can then change settings as outlined in steps 2 through 4 in the Create a sorted view procedure above.
How folders are sorted with other items
By default, folders are shown above any files or items (in an ascending sort), or below any files or items (in a descending sort) regardless of the name of the folder.
If you want the sorting to also affect the position of the folders within the view, select Sort only by specified criteria (folders may not appear before items).
When a column doesn't sort correctly
If a column isn't sorting accurately, the likely reason is that the column was set up for a different kind of data than it actually contains.
For example, Numbers and Text are different kinds of data, and each kind is sorted differently. If a Text column contains numerals rather than words, when you sort that column, the numbering would be sorted inaccurately, like this:
1, 11, 12, 2, 21, 22, 3, 4, 5, 6, 7, 8, 9 ...
You can fix this situation by changing the underlying Type setting for the column, as described below:
Change a column's Type to make it sort correctly
Select the heading of the column you want to change, then select Column Settings>Edit.
Under Type, select the downward pointing arrow to open the menu of options.
Select the option that best fits the kind of data in the column.
Caution: When you change the type of information that a column holds, it is possible that some existing data will be lost from your column. But if you are choosing an option that matches the actual data in the column, data loss likely won't occur. For example, in the previously cited example, where you have a Single line of text column that's filled with numbers and you change the type to Numbers, the column data likely wouldn't disappear.
Test the sorting of the column to ensure it works as you expect.
The column I want to sort by isn't available in the list
If a column contains one of the following types of data, it can't be sorted:
Multiple lines of text
Choice, where multiple values are allowed
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.