Excel Sort Is Not Working: How to Properly Fix It

Ensure that the cell values in your dataset are in the same format

by Sagar Naresh
Sagar Naresh
Sagar Naresh
Content Analyst
Sagar is a web developer and technology journalist. Currently associated with WindowsReport and SamMobile. When not writing, he is either at the gym sweating it out or playing... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • Sorting is a nice function as it helps you to organize data in a meaningful order.
  • However, multiple users have reported that the sort function does not work properly on their datasets.
  • You should make sure that there aren't any leading or trailing spaces in your cell values.

To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:

  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

Microsoft Excel is a powerful tool that helps you manage and sort a huge dataset into meaningful information. However, several Microsoft Excel users have reported that for them the Excel sort is not working, and they are facing issues creating their spreadsheets.

If you are also one such user facing the Excel sort not working problem, then you are in the right place. Because this guide will give you a bunch of solutions to resolve the problem at your end. Let us get right into it.

Why is Excel sort not working properly?

After some research, we have created a list of reasons why the Excel sort is not working properly for you on your Windows PC:

  • Non-printable characters: If there are non-printable characters, such as paragraph marks, tab characters, optional hyphens, etc., in your Excel sheet, then the tool will have problems sorting data.
  • Hidden rows or columns: The presence of hidden rows or columns can also prevent you from applying a sort or filter.
  • You have already sorted data: By mistake, you might have already applied sort to your data which is why the formatting isn’t applying again.
  • File corruption: You should also ensure that the file that you are working with isn’t corrupt.

How can I fix the Excel sort not working problem?

Here are a few things that we would advise you to do before applying the advanced troubleshooting solutions:

  • A simple restart can fix multiple issues related to your PC. Chances are that Microsoft Excel is facing some temporary glitch or bug that is causing the problem.
  • Check if the MS Excel that you are working with is up to date as new updates often bring fixes for bugs.
  • Make sure that the file that you are working with isn’t corrupt.

Let us check out the advanced solutions to resolve the problem.

Note icon
We will be showing different examples for each solution to make you understand how the errors can affect the sort and filter process in Excel.

1. Delete any blank cell

  1. Select the entire dataset on your spreadsheet.
  2. Click on Sort & Filter in the Home tab and select Custom Sort.
  3. Select Total in Order by and Order as Smallest to Largest.
  4. Click OK.

When you press OK, you will see the blank cells will be placed at the bottom of the dataset after applying the sort tool, which isn’t the correct way. Here are two things that you can do to fix the Excel sort not working problem:

  • You need to remove the blank cells from your dataset.
  • Fill in the blank cells with data values and then apply the sort tool.

2. Remove leading/trailing space before cell values

  1. In the below dataset, you can see that there is leading space in cell values in the A2, A4, A6, and A7.
  2. Click on Sort & Filter in the Home tab and select Custom Sort.
  3. Select Sort by as Region.
  4. Press OK.

Once you apply the sort, you will see that the cells with leading spaces in their values are placed at the top ahead of the other cells.

Expert tip:


Some PC issues are hard to tackle, especially when it comes to corrupted repositories or missing Windows files. If you are having troubles fixing an error, your system may be partially broken.
We recommend installing Restoro, a tool that will scan your machine and identify what the fault is.
Click here to download and start repairing.

To get rid of this problem, you need to remove the leading spaces from the highlighted cells and then apply the sort function.

3. Remove mixed data type

  1. In the below dataset, you can see that cells E6 to E9 contain Text values.
  2. So, to fix this issue, select the dataset and click on Sort & Filter.
  3. Select Custom Filter.
  4. In the message that pops up, select Sort anything that looks like a number, as a number option.
  5. Hit OK.

Often when you copy and paste data from another sheet or from the internet, it does not get pasted in a proper format. So, there could be some cells in your dataset containing text values in place of numbers.

In such a case, you can follow the above steps and ensure that the sorting function applies correctly to your spreadsheet.

4. Select a valid date format

  1. Select the cells that contain dates.
  2. Press Ctrl + 1 on your keyboard to open the Format Cells menu.
  3. Switch to the Number tab.
  4. Click on Date under Category.
  5. Select the appropriate date type inside the Type box.

These are a few ways you can make the sort function work properly for your dataset. Well, this isn’t the only problem MS Excel users come across.

We have a guide for users that are facing Excel won’t scroll down errors. You can also check out our guide on the Excel toolbar missing to fix the issue.

You can also check out our guide that gives you detailed steps to open two Excel side by side to improve efficiency. Also, did you know that you can open multiple Excel files at once, if not, then check out our guide.

Some users have reported that they aren’t able to open Excel on their Windows 11 PCs. Fortunately, we have a guide that lists some solutions to resolve this issue.

Still having issues? Fix them with this tool:


If the advices above haven't solved your issue, your PC may experience deeper Windows problems. We recommend downloading this PC Repair tool (rated Great on TrustPilot.com) to easily address them. After installation, simply click the Start Scan button and then press on Repair All.

This article covers:Topics: