[Fixed!] Sort Largest to Smallest Not Working in Excel

Reason 1 – Numerical Data Converted into Text Format

The issue can occur if the data we are trying to sort is in Text format. We can only sort data from largest to smallest if the data is numerical.

Numerical Data Converted into Text Format


Solution: Use VALUE Function to Convert Text to Numeric Data

Steps:

  • Add a new column named Converted Data.
  • Select cell D5 and enter the following formula.
=VALUE(C5)
  • Press  Enter  to convert the data into the General format.

Use Value Function to Solve Sort Largest to Smallest Not Working in Excel

  • AutoFill the formula to the rest of the column to change the Text format into the General format for all data.

Use VALUE Function to Convert Text to Numeric Data to Solve Sort Largest to Smallest Not Working in Excel

  • Select all the data and press  Alt + A + S + S  to open the Sort dialogue box.
  • In the box, check the box of My Data has headers.
  • Select Converted Data in Sort by.
  • Choose Largest to Smallest in Order and press OK.

Use VALUE Function to Convert Text to Numeric Data to Sort Largest to Smallest Not Working in Excel

  • The sorting issue will be fixed.

Use VALUE Function to Convert Text to Numeric Data to Sort Largest to Smallest Not Working in Excel

Read More: [Solved!] Excel Sort Not Working


Reason 2 – Extra Space Before or After Numerical Entry

The second reason for getting the sort from largest to smallest not working in Excel can occur because of the presence of extra spaces before or after a numerical value. To check if any extra space is present in the data:

Steps:

  • Insert a column named Check.
  • Select cell D5 and add following formula.
=ISNUMBER(C5)
  • The formula will show FALSE if extra space is present and it will show TRUE otherwise.

Check for Space to Solve Sort Largest to Smallest Not Working in Excel

  • AutoFill this formula to the rest of the cells to check all the data.

Check for Space to Solve Sort Largest to Smallest Not Working in Excel


Solution: Apply TRIM Function to Remove Spaces

Steps:

  • Add a new column named Converted Data and enter the following formula in cell E5.
=TRIM(C5)
  • Hit  Enter , and it will remove any extra space that is present in the cell.

Apply TRIM Function

  • AutoFill this formula to the rest of column E and remove all the extra spaces.

AutoFill TRIM Functionl

  • Select column E and press  Alt + A + S + S .
  • The Sort dialogue box will pop up.
  • In the box, check the My data has headers option.
  • Select Converted Data and Largest to Smallest.
  • Press OK.

Apply TRIM Function to Remove Spaces to Solve Sort Largest to Smallest Not Working in Excel

  • The data will be correctly sorted.

excel sort largest to smallest not working

Read More: [Fixed!] Sort and Filter Not Working in Excel


Reason 3 – Numbers Generated Using Formula

Another reason this problem can occur is if you try to sort numbers that are generated using any formula. In the following example, the numbers are generated using the RANDBETWEEN function. If we try to sort these numbers, the numbers get randomized and the sort doesn’t work properly.

Problem of Numbers Generated Using Formula in Sort Largest to Smallest Not Working in Excel


Solution: Copy and Paste As Values

Steps:

  • Select all the data generated using a formula and right-click on it.
  • Select Copy.

Copy and Paste As Values to Solve Sort Largest to Smallest Not Working in Excel

  • Click on cell C5 and right-click.
  • Select Paste as Values.

Copy and Paste As Values to Solve Sort Largest to Smallest Not Working in Excel

  • Press  Alt + A + S + S  to open the Sort pop-up box.
  • In the box, make sure the box of My data has headers option is checked.
  • Choose Quantity Sold in Sort by and Largest to Smallest in Order.
  • Hit the  Enter button.

Copy and Paste As Values to Solve Sort Largest to Smallest Not Working in Excel

  • The sorting issue will be fixed.

Copy and Paste As Values to Solve Sort Largest to Smallest Not Working in Excel


Reason 4 – Mixture of Different Data Types

Sort largest to smallest not working in Excel can also occur if the data we are trying to sort are of different types. If some data are in General and others are in Text format, the Sort feature won’t work correctly.

Mixture of Different Data Types issue in Sort Largest to Smallest Not Working in Excel


Solution: Convert Data into Number Format

Steps:

  • Select all the data from column C.
  • Click on the Home tab and go to Home → Number → Number

Use Number Feature

  • Once all the data are in Number format, open the Sort dialogue box.
  • In the box, check the box of My Data has headers.
  • Select Converted Data in Sort by.
  • Choose Largest to Smallest in order.
  • Press OK.

Convert Data into Number Format

  • The sorting issue will be fixed.

Convert Data into Number Format to Solve Sort Largest to Smallest Not Working in Excel

Notes

Note: When the data you want to sort is generated by any formula, it is best to copy and paste those data as values before sorting.

Read More: Excel Not Sorting Numbers Correctly


Download Practice Workbook


Related Articles


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

Get FREE Advanced Excel Exercises with Solutions!
Alif Bin Hussain
Alif Bin Hussain

Alif Bin Hussain earned a BSc in Civil Engineering from Bangladesh University of Engineering and Technology. As an engineering graduate, he has a deep passion for research and innovation. He loves to play with Excel. In his role as an Excel & VBA Content Developer at ExcelDemy, he not only solves tricky problems but also shows enthusiasm and expertise in handling tough situations with finesse, emphasizing his dedication to delivering top-notch content. He is interested in C, C++,... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo