Office Settings & Configuration

Prevent an Excel Quantity Sort From Resetting When Data Changes

Kushani NimanthikaKushani Nimanthika Dec 2, 2026 869 views

Question details

The user wants a list to remain sorted by quantity in descending order when items are added or edited.

Prevent an Excel Quantity Sort From Resetting When Data Changes
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user sorts a list by quantity and then adds items or changes quantity values.
Observed behavior
New or edited items may appear at the top or otherwise fall out of the intended descending order.
Before you start

Check that the Quantity column contains numeric values and that each item’s related fields are in the same row. Identify whether the list is a regular range, an Excel Table, or the result of a formula.

Solution 1Recommended

Sort the Complete List Using an Excel Table

Use a table to keep related rows together and make the quantity sort easy to reapply after changes.

1
Select the full list

Select the data range, including the Quantity column, item details, and headers. Include all rows that should be sorted together.

2
Create a table

Choose Insert > Table, confirm the range, and select My table has headers if applicable. Click OK.

3
Sort by quantity

Open the filter arrow in the Quantity header and choose Sort Largest to Smallest.

4
Reapply after changes

Add new records directly below the table so they are included, then use the Quantity header’s filter arrow to choose Sort Largest to Smallest again after adding or editing values.

Sort the Complete List Using an Excel Table
A table does not automatically re-sort: Excel Tables expand to include adjacent new rows, but edited or added values do not automatically move into sorted order. Automatic re-sorting requires a separate formula or automation solution.
Sort spreadsheets with WPS Office

Sort a Quantity List in WPS Spreadsheets

Use WPS Spreadsheets to sort an entire list by quantity in descending order. Reapply the sort after adding or editing values to restore the intended order.

  1. 1. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
  2. 2. Select the list: Select the complete data range, including the Quantity column and all related item fields.
  3. 3. Set the sort order: Choose Data > Sort, select Quantity as the sort column, and choose descending order. Confirm the sort.
  4. 4. Reapply when needed: After adding rows or changing quantities, select the complete updated range and use Data > Sort again.
Sort quantity values while keeping related row data togetherOpen and edit Microsoft Excel XLS and XLSX filesUse familiar spreadsheet sorting controlsWork with a free, easy-to-use office suite
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't Excel automatically sort after I edit a quantity?

A manual sort rearranges the current data once; it does not continuously monitor changes. Use the Quantity header’s filter arrow to sort Largest to Smallest again, or implement a separate automated solution.

Will converting my range to an Excel Table keep it sorted automatically?

No. Insert > Table makes the range easier to manage and can include new adjacent rows, but you still need to reapply the sort after changes.

How do I keep item names and quantities together when sorting?

Select the entire list before choosing Data > Sort. If Excel asks whether to expand the selection, choose Expand the selection so related columns move together.

Why might quantities appear in an unexpected order?

Some values may be stored as text rather than numbers, or the sort may use the wrong column or range. Check the Quantity cells, then open Data > Sort and select Quantity with Largest to Smallest.