Prevent an Excel Quantity Sort From Resetting When Data Changes
Question details
The user wants a list to remain sorted by quantity in descending order when items are added or edited.

- 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.
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.
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.
Select the data range, including the Quantity column, item details, and headers. Include all rows that should be sorted together.
Choose Insert > Table, confirm the range, and select My table has headers if applicable. Click OK.
Open the filter arrow in the Quantity header and choose Sort Largest to Smallest.
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.

Check for Formulas or Macros That Change the Order
Use this check if the order changes unexpectedly even after sorting the complete list.
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. Open the workbook: Open WPS Spreadsheets and use Open to select your Excel workbook.
- 2. Select the list: Select the complete data range, including the Quantity column and all related item fields.
- 3. Set the sort order: Choose Data > Sort, select Quantity as the sort column, and choose descending order. Confirm the sort.
- 4. Reapply when needed: After adding rows or changing quantities, select the complete updated range and use Data > Sort again.

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.




