Excel Sort Is Not Working: How to Properly Fix It

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

Reading time icon 4 min. read

Readers help support Windows Report. When you make a purchase using links on our site, we may earn an affiliate commission. Tooltip Icon

Read the affiliate disclosure page to find out how can you help Windows Report effortlessly and without spending any money. Read more

Key notes

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

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

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.

More about the topics: Excel, Microsoft Excel