The Sort and Filter is Not Working in Excel

 

The sample dataset showcases Number of Visits of websites, their Name and Category. Dates and Platforms are also given.

Dataset


Solution 1 – There are Blank Cells and the Excel Sort Function does Not Work 

F7 and F10 are blank in the dataset.

If Any Cell is Blank

To apply the Sort tool:

  • Select the whole dataset.
  • In the Home tab, select Sort & Filter.
  • Choose Custom Sort.

If Any Cell is Blank

  • Choose Number of Visits in Sort by and Smallest to Largest in Order.

If Any Cell is Blank

  • Click OK.
  • An error is displayed and the blank cells are located at the bottom of the table.

If Any Cell is Blank

To solve the issue:

  • Either delete the blank rows or fill the blank cells with cell values and apply the Sort tool again.

Read More: [Solved!] Excel Sort Not Working


Solution 2 – A Leading Space is Present When the Excel Sort Function is Applied

There’s a leading space in C8, C11, and C15.

Sort and Filter in Excel Not Working Presence of Leading Space

  • Apply the Custom Sort for Category of the Sites and choose A to Z.

Sort and Filter in Excel Not Working Presence of Leading Space

  • Categories including the leading space are placed before all other categories.

Sort and Filter in Excel Not Working Presence of Leading Space

Go to C8 and remove the space before the text.

Sort and Filter in Excel Not Working Presence of Leading Space

You’ll get the expected output if you apply the Custom Sort again.

Presence of Leading Space


Solution 3 – There is Mixed Data Type in the Same Column 

In F5:F15, F6, F8, F9, F11, and F13 hold numbers stored as text with leading zeros.

Sort and Filter in Excel Not Working Mixed Data Type in the Same Column

Sorting will not work.

Mixed Data Type in the Same Column

 

  • Select Sort and the dialog box Sort Warning will be displayed.
  • Check  Sort anything that looks like a number, as a number.

Mixed Data Type in the Same Column

This is the output.

Sort and Filter in Excel Not Working Mixed Data Type in the Same Column

Read More: Excel Not Sorting Numbers Correctly


Solution 4 – The Excel Sort by Date Function does Not Work When there Is Text Format

The Sort feature is not working in the date column.

Sort and Filter in Excel Not Working Excel Sort by Date Not Working

If you apply Sort to Date of Visiting, you’ll get the following output.

Sort and Filter in Excel Not Working Excel Sort by Date Not Working

The date is in Text format.

  • Open Format Cells by pressing CTRL + 1.
  • Choose a Date format.

Sort and Filter in Excel Not Working Excel Sort by Date Not Working

This is the output.

Sort and Filter in Excel Not Working Excel Sort by Date Not Working

You may also apply the Text to Column feature.


Solution 5 – Excel Filter Is Not Working When there are Blank or Hidden Rows

Rows 8 and 12 are blank.

Sort and Filter in Excel Not Working If Blank or Hidden Rows Exist

Apply the Filter tool.

  • Select the cell range you want to filter.
  • Go to the Home tab and select Editing.
  • Choose Filter in Sort & Filter.

Sort and Filter in Excel Not Working If Blank or Hidden Rows Exist

The output includes blank rows.

Sort and Filter in Excel Not Working If Blank or Hidden Rows Exist

  •  Uncheck Blank Cells.

If Blank or Hidden Rows Exist

This is the output.

If Blank or Hidden Rows Exist


Solution 6 – There are Merged Cells and the Excel Filter does not work

There are merged cells in the dataset.

Presence of Merged Cells

You’ll get errors if you filter. You need to unmerge cells.

  • Go to the Home tab.
  • Select Unmerge Cells in Merge & Center.

Presence of Merged Cells

Read More: Excel Sort by Cell Color Not Working


Solution 7 – The Excel Filter Stops Working If Errors are Present

In the dataset below, there are errors in  F5:F15.

Errors in Dataset

To filter data:

  • Uncheck Number and Text.

Errors in Dataset


Solution 8 – The Excel Filter Doesn’t Work with the Column Heading 

There must be a single row in the column header.

Confusing Column Heading

Insert a new line:

  • Press ALT + ENTER to insert a line break.
  • Use the Wrap Text option.

Confusing Column Heading


Sort and Filter are Grayed out in Excel

 

Sort and Filter are Greyed out in Excel

Activate the tool by ungrouping the sheets.

  • Right-click and choose Ungroup Sheets.

Sort and Filter are Greyed out in Excel

 


Download Practice Workbook


 

Related Articles:


<< Go Back to Excel Sort Not Working | Sort in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Md. Abdul Kader
Md. Abdul Kader

MD. ABDUL KADER is an engineer with a talent for Excel and a passion for VBA programming. To him, programming is like a time-saving wizard, making data manipulation, file handling, and internet interactions a breeze. His skill set extends to SWM, GIS, RS, and SPSS. He holds a B.Sc in Urban & Regional Planning from Chittagong University of Engineering and Technology and has shifted to become a content developer. In this role, he crafts technical content centred around... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo