How to Fix Excel Sort Not Working: An Easy Guide[2024]

January 8, 2024 8.9K views

The sorting function in Excel is a powerful tool for organizing data. It allows you to arrange data in a specific order, making it easier to analyze, interpret, and present information effectively. However, sometimes the sorting function can malfunction. This can be frustrating, especially if you need to sort data quickly and easily. This article will provide a detailed guide on how to fix the sorting function in Excel and master sorting effectively.

Reasons Why Excel Sort Not Working

  • Non-Printable Characters in Numbers: Non-visible characters within numbers can throw off sorting. These hidden characters disrupt the natural sorting order.

  • Leading or Trailing Spaces: Spaces before or after numbers can lead to sorting errors. Excel may perceive these as part of the value, affecting the sorting sequence.

  • Numeric Values Formatted as Text: If numbers are formatted as text, they won't sort correctly. Excel treats them as words, not numerical values, causing sorting confusion.

  • Numbers from Excel RAND or RANDBETWEEN Functions: Numbers generated through these functions change each time you recalculate the sheet. This constant change hampers sorting consistency.

How to Fix Excel Sort Not Working

  • Delete Any Blank Cell

Step 1: Select the entire dataset on your spreadsheet.

Step 2: Click on "Sort & Filter" in the "Home" tab, then select "Custom Sort.

Step 3: In the "Custom Sort" dialog, choose "Total" for "Sort by." Select "Smallest to Largest" for "Order," located under the "Sort By" dropdown. Click "OK" to apply the sorting criteria.

Step 4: After pressing OK, observe that the blank cells will be shifted to the bottom of the dataset. However, this may not be the intended outcome.

This method will shift the blank cells to the bottom of the dataset, but it may not be the desired outcome. Consider alternative methods for accurate data organization.

  • Remove Leading/Trailing Space Before Cell Values

Step 1: In the provided dataset, observe leading spaces in cell values (A2, A4, A6).

Step 2: Click on "Sort & Filter" within the "Home" tab and choose "Custom Sort."

Step 3: In the "Custom Sort" dialog, set "Sort by" as "Day."

Step 4: Press "OK" to apply the sorting criterion.

This method will sort the cells by the Region column, and the cells with leading spaces will be positioned at the top.

  • Remove Mixed Data Type

Step 1: Observe that cells B3 to B5 in the dataset contain text values.

Step 2: Select the dataset and access the "Sort & Filter" function. Opt for "Custom Sort."

Step 3: In the ensuing message, choose the "Sort anything that looks like a number, as a number" option.

Step 4: Click "OK."

This method will filter the dataset to remove any cells that are not numbers. This will help to ensure that the data is consistent and easier to sort and analyze.

  • Select a Valid Date Format

Step 1: Highlight cells containing dates.

Step 2: Press Ctrl + 1 on your keyboard to open the Format Cells menu. Navigate to the Number tab. Click on "Date" in the Category section.

Step 3: Inside the Type box, choose the suitable date format.

This method will format the cells containing dates to the desired format. This will make it easier to read and understand the data.

Recommend WPS Spreadsheet
  • Use Word, Excel, and PPT for FREE, No Ads.

  • Same Excel Formula as Microsoft. Perfectly compatible with MS format.

  • Microsoft-like interface. Easy to learn. 100% Compatibility.

  • Boost your professional productivity by 10x with WPS's abundant free Excel templates.

5,820,008 User
Algirdas Jasaitis

Avoid Excel Sorting Trouble: Check Your Data

Sorting data in Excel can be a breeze when you follow these essential steps to sidestep potential troubles. Here's your comprehensive tutorial:

  • Make a Backup of Your Data

Step 1: Open your Excel file.

Step 2: Go to the "File" tab.  Select "Save As."

Step 3: Choose a backup location and rename the file. Then click "Save."

  • Check Your Data

Step 1: Click on any cell within the column you intend to sort.

Step 2: Press Ctrl + A to select the entire range.

Step 3: Confirm that all the data is indeed included in the selection.

Step 4: For instance, in the screenshot below, hidden column E is empty.

Step 5: After using Ctrl + A, columns F, G (hidden), H, and I remain unselected.

  • Fix Blank Rows and Columns

Step 1: If any data was NOT selected, identify and address blank rows or columns.

Step 2: You might need to unhide rows or columns to locate the blanks.

Step 3: Upon discovering a blank row or column:

If unnecessary, delete it.

If essential, input at least one item (like "x") as a placeholder.

Step 4: For example, in a column heading, use "x" to mark a needed column.

Step 5: Once blank rows or columns are handled:

Step 6: Press Ctrl + A again to verify if the entire range is selected.

Step 7: If not, search for additional blank rows or columns and either delete or fill them.

Step 8: When the entire range IS selected, you're ready to safely sort the data.

Free Office Suite for Word, Excel, PowerPoint ——WPS Office

WPS Office, a potent and free office suite encompassing Writer, Spreadsheets, Presentation, and PDF capabilities. It's a favored Microsoft Office alternative, embraced by millions worldwide. With its modern interface, WPS Office is user-friendly and accessible, catering to all skill levels..


  • Free to use.

  • Simple interface.

  • Convenient functions.

  • Compatible with Microsoft Office files.

  • Cloud storage and collaboration features.

  • Regularly updated with new features and improvements.

If you are looking for a free and powerful office suite, I would definitely recommend WPS Office. It is a great option for students, businesses, and anyone else who needs to create, edit, and share documents, spreadsheets, and presentations.

Download website:

Frequently Asked Questions (FAQs)

1. Can I sort data with hidden rows and columns?

Absolutely! In Excel, hidden rows and columns don't hinder sorting. Even when they're concealed, the data in those cells remains part of the worksheet and can be seamlessly sorted.

2. Does Excel offer multi-level sorting options?

Indeed, Excel is equipped with multi-level sorting capabilities. This means you can sort data based on several criteria, ensuring precise order and arrangement.


This comprehensive guide empowers you to confidently address Excel sorting issues. By mastering techniques such as eliminating hidden characters and managing blank rows, you're equipped to overcome any sorting challenge.

Moreover, the introduction of WPS Office as a robust and free alternative enhances your productivity. With these solutions at your fingertips, Excel sorting troubles will no longer impede your efficiency.

15 years of office industry experience, tech lover and copywriter. Follow me for product reviews, comparisons, and recommendations for new apps and software.