Function Problems

Fix Excel 365 Sort Commands Not Working or Changing Data Order

Amos GikundaAmos Gikunda Nov 3, 2026 871 views

Question details

User is experiencing an issue where Excel 365 sorting commands fail to reorder data, and VBA sorting triggers an automation error.

Fix Excel 365 Sort Commands Not Working or Changing Data Order
Product
Excel 365
Device & OS
not provided
Scenario
Attempting to reorder data using Sort A to Z, Sort Z to A, the Sort dialog, or via VBA code.
Observed behavior
The data order remains completely unchanged after applying sort commands, VBA throws an automation error, and repairing or reinstalling Office does not resolve the issue.
Before you start

Before troubleshooting, test a completely new, blank workbook to determine if the sorting issue is isolated to your current file or affects your entire Excel application.

Solution 1Recommended

Verify Calculation Options and Use Custom Sort

Ensure Excel is set to calculate formulas automatically, as manual calculation can sometimes prevent sorted data from refreshing properly on the screen.

1
Open Formula Options

Navigate to the File tab in the top-left corner, click on Options at the bottom, and select Formulas from the left-hand menu.

2
Set Calculation to Automatic

Under the Calculation options section, ensure that the 'Automatic' radio button is selected, then click OK.

3
Apply Custom Sort

Highlight your specific data range manually. Go to the Data tab, click on Sort to open the Custom Sort dialog, define your column criteria, and click OK to force the operation.

Verify Calculation Options and Use Custom Sort

Sort Your Data Seamlessly with WPS Spreadsheet

If Excel 365 is experiencing persistent automation errors or sorting glitches, you can easily open your workbook in WPS Spreadsheet to sort your data without losing any formatting.

  1. 1. Open Your File: Launch WPS Spreadsheet and open your existing Excel workbook.
  2. 2. Select the Data: Click and drag to highlight the specific range of data you want to sort.
  3. 3. Navigate to the Data Tab: Click on the 'Data' tab located on the top ribbon menu.
  4. 4. Apply Sorting: Click the 'Sort' icon to choose ascending, descending, or custom criteria.
  5. 5. Confirm and Save: Click OK to instantly reorder your data, then save your file.
Highly compatible with Microsoft Excel (.xlsx, .xls) file formats.Reliable sorting functions including Custom Sort, A to Z, and Z to A.Lightweight software that avoids heavy COM add-in conflicts.Free to use with a familiar, user-friendly interface.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel sorting not change the data order even after repairing Office?

This can happen if Excel's calculation option is set to manual, if a third-party COM add-in is intercepting the sort command, or if there is hidden formatting and merged cells preventing the data from shifting correctly.

What causes a VBA automation error when sorting in Excel 365?

VBA automation errors during a sort operation typically indicate broken library references (often marked as 'MISSING' in the VBA editor), corrupted macro code, or software conflicts introduced by recent system updates.

How can I force my data to sort if the standard A to Z buttons fail?

Instead of relying on Excel to auto-detect the bounds of your data, manually highlight the exact cells you want to organize. Then, use the Custom Sort dialog under the Data tab to define specific columns and sorting rules.

Will opening my file in Safe Mode fix the sorting issue permanently?

No, Safe Mode is a diagnostic tool. If sorting works in Safe Mode, it simply proves an add-in or startup program is causing the issue. You must disable the conflicting add-in in normal mode to achieve a permanent fix.