logo
search
SharePoint Document Issues

How to Sort SharePoint Files and Folders Numerically

Maira MehtabMaira Mehtab Sep 22, 2026 869 views

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'.
Before you start

Ensure you have 'Edit' or 'Design' permissions in the SharePoint document library to rename files, modify column settings, or create new list views.

Solution 1Recommended

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.

1
Select the item

Navigate to your SharePoint document library and locate the file or folder you want to rename.

2
Open the rename menu

Click the three horizontal dots (Show actions) next to the file or folder name, and select 'Rename' from the dropdown menu.

3
Pad with zeros

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).

4
Save changes

Click 'Rename' or press Enter to save. SharePoint will now correctly sort 'A01', 'A02', and 'A10' in ascending order.

Free Microsoft Office alternative

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. 1. Download and Install: Get WPS Office for free from the official website and follow the quick installation prompts.
  2. 2. Open Your Documents: Download your files from SharePoint and open them directly in WPS Office.
  3. 3. Edit and Save: Make your changes using professional editing tools and save them back in their native formats to upload to SharePoint.
Fully compatible with standard Microsoft Office formats (.docx, .xlsx, .pptx).Lightweight design that runs quickly on Windows, Mac, Linux, and mobile devices.Free to use with a familiar, tabbed interface for seamless migration from MS Office.Built-in PDF editing tools for streamlined document management.
microsoft office alternative - wps office

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.