logo
search
SharePoint Document Issues

How to Set a Custom Sort Order for Documents in a SharePoint Library

Maira MehtabMaira Mehtab Sep 28, 2026 870 views

Question details

The user needs to manually define the sequence in which documents appear in a SharePoint library, rather than relying on default alphabetical or numerical sorting.

Product
SharePoint
Device & OS
not provided
Scenario
Organizing files such as a manual or structured guide where documents must appear in a specific, non-alphabetical reading order.
Observed behavior
By default, SharePoint document libraries only sort file names alphabetically or numerically, which disrupts the required manual document sequence.
Before you start

Ensure you have the necessary Edit or Full Control permissions for the SharePoint document library to create new columns and modify the default view.

Solution 1Recommended

Create a Custom Numeric Order Column

Assign a manual numerical value to each document to dictate its exact position in the library view.

This is the most straightforward method for creating a custom sort order. By adding a dedicated number column, you can assign a precise position to each document and then hide the column to keep the library interface clean.

1
Add a new number column

Navigate to your SharePoint document library. Click on 'Add column' at the end of the header row, select 'Number' from the options, name it 'SortOrder', and click 'Save'.

2
Assign sequence values

Select each document in the library, open the details pane, and input the desired sequence number (e.g., 1, 2, 3) into the newly created 'SortOrder' field.

3
Apply the sort order

Click on the 'SortOrder' column header and select 'Sort ascending' to rearrange the documents according to your custom sequence.

4
Hide the column

To clean up the view, click 'Add column', select 'Show/hide columns', uncheck the 'SortOrder' column, and click 'Apply'. Save the view if prompted.

View Saving: Don't forget to click the view dropdown menu (e.g., 'All Documents') and select 'Save view as' to ensure your custom sorting remains default for all users.
Free Microsoft Office alternative

Edit Your SharePoint Documents with WPS Office

While SharePoint handles your team's cloud storage, WPS Office provides a lightweight, fast, and completely free alternative for editing the Word, Excel, and PowerPoint files stored within your library.

  1. 1. Download WPS Office: Install the free WPS Office suite on your Windows, Mac, or Linux computer.
  2. 2. Open downloaded files: Download your categorized documents from SharePoint and open them directly in WPS Office.
  3. 3. Edit and save: Make your edits with full formatting compatibility and upload the finalized versions back to your SharePoint library.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) downloaded from SharePoint.Lightweight architecture ensures fast loading times for heavy manuals and large datasets.Tabbed interface allows you to view and edit multiple documents in a single organized window.Includes a powerful built-in PDF editor for finalizing and sharing your sorted manuals.
microsoft office alternative - wps office

Frequently Asked Questions

Will hiding the custom sort column disrupt the sequence?

No. Once you configure the library view to sort by your custom column and save the view settings, hiding the column from the display will not affect the sorting order.

Why is my calculated column sorting files like 1, 10, 2, 3?

This happens when the calculated column's return data type is set to 'Single line of text'. To fix this, edit the column settings and change the return data type to 'Number' so it sorts numerically.

Can I apply this custom sort order to folders as well?

Yes. If your custom column is applied to the folder content type, you can assign numeric values to folders just like files, allowing you to sequence folders manually within the SharePoint library view.