Sort Option is grayed out

Bob Weenig 0 Reputation points
2026-12-04T00:49:18.5233333+00:00

The sort option in Excel is grayed out, how to activate it?

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-12-04T00:50:12.32+00:00

    The activation method depends on the workbook state; first check whether the worksheet is protected, because Excel disables sorting when the sort range contains locked cells.

    1. Check worksheet protection

    Open Review and inspect the protection command:

    • If it says Unprotect Sheet, select it and enter the password if prompted.
    • Select a cell in the data, then choose Data → Sort & Filter → Sort.

    If the sheet must remain protected:

    1. Unprotect it temporarily.
    2. Select the entire range that users need to sort, including headers and any hidden rows.
    3. Press Ctrl+1 → Protection.
    4. Clear Locked, then select OK.
    5. Select Review → Protect Sheet.
    6. Enable Sort, set a password if required, and select OK.

    Merely enabling Sort during protection is insufficient: Excel cannot sort a protected range containing locked cells.^1^

    2. Check whether worksheets are grouped

    Look for [Group] in Excel’s title bar or multiple highlighted worksheet tabs. If present:

    1. Right-click any selected worksheet tab.
    2. Select Ungroup Sheets.
    3. Select one cell in the data and retry Data → Sort.

    Excel displays Group in the title bar when multiple worksheets are selected; right-clicking a selected tab provides the Ungroup Sheets command.^2^

    3. Confirm the workbook is editable

    If a yellow Protected View banner appears, and the file is from a trusted source, select Enable Editing. Protected View is read-only and disables most editing commands.^3^

    If Excel shows Viewing or the file is locked:

    • Select Viewing → Request more access → Ask to edit, or ask the owner to grant edit permission.
    • If the file is locked by your own account, close it on other devices and wait briefly for the lock to clear.^4^

    4. Check for merged cells

    If Sort becomes selectable but fails or reports that merged cells must be identically sized:

    1. Make a backup first because unmerging can alter the layout.
    2. Select the complete sorting range.
    3. Open Home → Alignment dialog launcher → Alignment.
    4. Clear Merge cells and select OK.
    5. Retry the sort.

    Excel cannot sort a range containing inconsistently sized merged cells.^5^

    5. Isolate a workbook-specific problem

    Create a blank workbook, enter a few values, select one value, and try Data → Sort A to Z. The normal Windows procedure is to select a cell in the target column and use the Data → Sort & Filter commands.^6^

    • Sort works in the blank workbook: the original file has a protection, permission, grouping, or range-layout restriction.
    • Sort remains gray in every workbook: close Excel and reopen it in Safe Mode. If sorting works there, investigate add-ins or the current Windows profile; a matching Excel case was resolved by testing with a new Windows user profile.^7^

    References

    1. [Windows](https://support.microsoft.com/excel/protect-a-worksheet#enable-worksheet-protection)
    2. [Newer versions](https://support.microsoft.com/excel/select-worksheets)
    3. What is Protected View? | Microsoft Support
    4. Excel file is locked for editing | Microsoft Support
    5. You might receive an error message when you sort a range that contains merged cells in Excel
    6. [Windows](https://support.microsoft.com/excel/sort-data-in-a-range-or-table-in-excel#learn-more-about-general-issues-with-sorting)
    7. None of the sorting buttons work - Microsoft Q&A
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.