How to Sort SharePoint Files and Folders Numerically
Question details
The user needs to configure a SharePoint document library to sort files and folders in ascending numeric order (e.g., A1, A2, A10) rather than the default alphabetical order.
- Product
- SharePoint
- Device & OS
- not provided
- Scenario
- Organizing documents and folders with alphanumeric names where standard alphabetical sorting disrupts the logical numerical sequence.
- Observed behavior
- SharePoint sorts alphanumeric values alphabetically by default, causing items like 'A10' to appear before 'A2'.
Ensure you have 'Edit' or 'Design' permissions in the SharePoint document library to rename files, modify column settings, or create new list views.
Add Leading Zeros to File and Folder Names
The most straightforward method to enforce numeric sorting in an alphabetical system is to pad your numbers with leading zeros.
Because SharePoint reads filenames character by character from left to right, matching the number of digits across all files ensures that they are read and sorted correctly.
Navigate to your SharePoint document library and locate the file or folder you want to rename.
Click the three horizontal dots (Show actions) next to the file or folder name, and select 'Rename' from the dropdown menu.
Add leading zeros to the numeric part of the filename. For example, change 'A1' to 'A01' (or 'A001' if you anticipate having more than 99 items).
Click 'Rename' or press Enter to save. SharePoint will now correctly sort 'A01', 'A02', and 'A10' in ascending order.
Use a Calculated Column for Sorting
If you have a dedicated number column but the view still sorts alphabetically, you can create a Calculated Column to force numeric formatting.
Edit Your SharePoint Documents Seamlessly with WPS Office
While SharePoint is excellent for storing and organizing files, editing downloaded Word, Excel, and PowerPoint documents requires a capable office suite. WPS Office is a lightweight, highly compatible, and free alternative to Microsoft Office that meets all your daily productivity needs.
- 1. Download and Install: Get WPS Office for free from the official website and follow the quick installation prompts.
- 2. Open Your Documents: Download your files from SharePoint and open them directly in WPS Office.
- 3. Edit and Save: Make your changes using professional editing tools and save them back in their native formats to upload to SharePoint.

Frequently Asked Questions
Why does SharePoint sort 10 before 2?
By default, SharePoint treats standard alphanumeric fields (like the 'Name' column) as text strings. It sorts them character by character from left to right. Because the character '1' in '10' comes before the character '2', the system places '10' before '2'.
Can I change the default sorting behavior of the standard Name column?
No, SharePoint does not provide a built-in toggle to switch the standard 'Name' column from alphabetical to numerical sorting. You must use workarounds such as adding leading zeros to the filenames or utilizing custom numeric columns.
Why can't I find the Calculated column type when adding a column?
In the modern SharePoint experience, the 'Calculated' column option is sometimes hidden from the quick-add menu. To find it, click 'Add column', scroll to the very bottom, and click 'More...'. This redirects you to the classic settings page where the Calculated column is available.




