Use a screen reader to sort or filter a table in Excel
Applies ToExcel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web Excel 2024 Excel 2024 for Mac Excel 2021 Excel 2021 for Mac Excel 2019 Excel 2016 Excel for iPhone Excel for Android phones

This article is for people with visual or cognitive impairments who use a screen reader program such as Microsoft's Narrator, JAWS, or NVDA with the Microsoft 365 products. This article is part of the Microsoft 365 screen reader support content set where you can find more accessibility information on our apps. For general help, visit Microsoft Support home or Fixes or workarounds for recent office issues.

Use Excel with your keyboard and a screen reader to sort and filter tables. We have tested it with Narrator, JAWS, and NVDA, but it might work with other screen readers as long as they follow common accessibility standards and techniques. Sorting data helps you organize and find the data that you want quickly, for faster analysis. Filtering data helps you focus on a particular set of data, which is especially useful in large worksheets.

Decorative icon. Need instructions on how to sort or filter data in Excel, but not using a screen reader? See Sort data in a range or table or Filter data in a range or table.

Notes: 

In this topic

Keyboard shortcuts for sorting and filtering

This table shows keyboard shortcuts for sorting and filtering.

To do this

Press

Turn off the AutoFilter dropdown menu in a column heading

Ctrl+Shift+L

Open the AutoFilter dropdown menu from a column header

Alt+Down arrow key

Sort smallest to largest, or A to Z

Alt+A, S, A or Alt+Down arrow key, S

Sort largest to smallest, or Z to A

Alt+A, S, D or Alt+Down arrow key, O

Open the Sort dialog box

Alt+A, S, S or Alt+H, S, U

Reapply a sort after you change the data

Ctrl+Alt+L or Alt+A, Y, 3

Filter by color

Alt+Down arrow key, I

Filter by number or text

Alt+Down arrow key, F

Open the Format Cells dialog box

Alt+H, O, I

Use the TRIM function

Alt+M, T, and then move to TRIM with the Down arrow key

Learn about sorting in Excel

You can sort data by text (A to Z or Z to A), numbers (smallest to largest or largest to smallest), and dates and times (oldest to newest or newest to oldest) in one or more columns. You can also sort by a custom list (such as Large, Medium, and Small) or by format, including cell color, font color, or icon set. Most sort operations are column sorts, but you can also sort by rows.

When you sort a table, Excel saves the criteria that you used with the workbook so that you can reapply it each time that you open the workbook. This is especially important for multicolumn sorts or for sorts that take a long time to create. However, this only works for data in a table, it doesn't apply to just a range of cells. If you want to save sort criteria so that you can periodically reapply a sort when you open a workbook, it's a good idea to use a table.

Note: Once you sort the data, you cannot restore the original order. If you haven't saved the file after sorting, you can use undo (Ctrl+Z) to go back.

Sort text in a table or range

Sort text in a table

  1. Navigate to the header row in the table using the arrow keys. When you are on the header row, you hear "Header item" after the cell location.

  2. Press the Right or Left arrow key to move to the column header for the data that you want to sort.

  3. Press Alt+Down arrow key to open the filter menu, and then press the Tab key repeatedly until you hear: "Menu, Sort A to Z, unchecked menu item."

  4. The options that appear depend on the kind of data in the column. For example, you can sort numeric data from smallest to largest or largest to smallest. You can sort alphanumeric data from A to Z or from Z to A. You can also sort by color.

    Use the Down arrow key to browse the options, and then press Enter to select an option. You hear "Sorted," followed by the selected option.

Sort text in a range

  1. Use the arrow keys to navigate to a column of alphanumeric data in a range of cells, or to a table column containing alphanumeric data.

  2. Press Alt+A. The Data tab opens, and with Narrator you hear: "Ribbon tabs, Selected, Data tab item." With JAWS, you hear: "Upper ribbon, Group box, Data tab." With NVDA, you hear: "Ribbon tabs tab control expanded, Data tab selected."

  3. Do one of the following:

    • To sort in ascending alphanumeric order (Sort A to Z), press S and then A.

    • To sort in descending alphanumeric order (Sort Z to A), press S and then D.

Make a case sensitive sort

  1. Use the arrow keys to navigate to a column of alphanumeric data in a range of cells, or to a table column containing alphanumeric data.

  2. Press Alt+H, S, U. The Sort dialog box opens, and with Narrator, you hear: "Sort, OK button." With JAWS, you hear: "Sort dialog, OK button." With NVDA, you hear: "Sort dialog, Sort window."

  3. Press Alt+O to open the Sort Options dialog box. With Narrator, you hear: "Sort options. Unchecked, Case sensitive checkbox." With JAWS, you hear: "Sort options dialog, Case sensitive checkbox, not checked." With NVDA, you hear: "Sort Options dialog orientation, Case sensitive checkbox, not checked."

  4. Press Spacebar to select the Case sensitive checkbox.

  5. Press Enter. The Sort Options dialog box closes, and with Narrator, you hear: "Sort, Options button." With JAWS, you hear: "Sort dialog." With NVDA, you hear: "Sort dialog, Sort window."

  6. To close the Sort dialog box and apply your changes, press the Tab key until you hear "OK button," and then press Enter.

  7. Sort text as explained in Sort text in a range.

Tip: If the column you sort contains a mixture of numbers and text, you might have to format them all as text. Otherwise, Excel sorts the numbers as numbers first, and then sorts the text. To format the data, press Ctrl+Spacebar to select all the data in the column, and then press Alt+H, F, N. Press the Left arrow key until you hear "Selected, Number tab item," press the Tab key once, and then press the Down arrow key until you hear: "Text." Press the Tab key once to move to the OK button, and press Enter.

Tip: When you import or copy data from a different location, it can have leading spaces inserted before data. For example, the name "Sue Lidman" might be entered as "(space)(space)Sue Lidman." If you use a screen reader, you might not know about the spaces, because JAWS doesn't read empty space in cells. To help you find them, Excel places cells that have leading spaces at the top of a sorted column.

Sort numbers

  1. Use the arrow keys to navigate to a column of numeric data in a range of cells, or to a table column containing numeric data.

  2. Press Alt+A. The Data tab opens, and with Narrator, you hear: "Ribbon tabs, Selected, Data tab item." With JAWS, you hear: "Upper ribbon, Group box, Data tab." With NVDA, you hear: "Ribbon tabs tab control expanded, Data tab selected."

  3. Do one of the following:

    • To sort from smallest to largest, press S and then A.

    • To sort from largest to smallest, press S and then D.

Check that numbers are stored as numbers

  1. Use the arrow keys to navigate to a column of numeric data in a range of cells, or to a table column containing numeric data, and then press Ctrl+Spacebar to select all the data in the column.

  2. Press Alt+H, F, N. The Format Cells dialog box opens, and you hear: "Format cells."

  3. To move to the Number tab, use the Left arrow key (or press Ctrl+Tab). With Narrator, you hear: "Number tab item." With JAWS, you hear: "Number tab." With NVDA, you hear: "Number tab, selected."

  4. Press the Tab key. The Category list opens, and you hear the currently selected category, such as "General" or "Date."

  5. Press the Up or Down arrow key until you hear: "Number."

  6. Press the Tab key until you hear "Decimal places," followed by the number of decimal places currently used. If you want to change this value, type the new number of decimal places. To remove decimals completely, type 0.

  7. To close the Format Cells dialog box and apply your changes, press the Tab key until you hear "OK button," and press Enter.

Sort dates and times

  1. Use the arrow keys to navigate to a column of dates or times in a range of cells, or to a table column containing dates or times.

  2. Press Alt+A. The Data tab opens, and with Narrator, you hear: "Ribbon tabs, Selected, Data tab." With JAWS, you hear: "Upper ribbon, Group box, Data tab." With NVDA, you hear: "Ribbon tabs tab control expanded, Data tab selected."

  3. Do one of the following:

    • To sort from oldest to newest, press S and then A.

    • To sort from newest to oldest, press S and then D.

    • To reapply a sort after you change the data, select a cell in the range or table and then press Ctrl+Alt+L.

Sort by more than one column

You might want to sort by more than one column or row when you have data that you want to group by the same value in one column or row, and then sort another column or row within that group of equal values. For example, if you have a Department column and an Employee column, you can first sort by Department (to group all the employees in the same department together), and then sort by name (to put the names in alphabetical order within each department). You can sort by up to 64 columns.

Note: For best results, the range of cells that you sort should have column headings. To sort by rows, make sure the My table has headings checkbox is cleared in the Sort dialog box. Press Alt+H, S, U to open the Sort dialog box, and press the Tab key until you hear "Checked, My data has headers checkbox" or "Unchecked, My data has headers checkbox." If you need to clear the checkbox, press Spacebar, press the Tab key until you hear "OK, button," and press Enter to apply the change.

  1. Use the arrow keys to navigate to a range of cells with two or more columns of data, or to a table with two or more columns.

  2. Press Alt+A, S, S. The Sort dialog box opens, and with Narrator, you hear: "Sort, OK button." With JAWS, you hear: "Sort dialog, OK button." With NVDA, you hear: "Sort dialog, Sort window."

  3. Press the Tab key until you find the Column: Sort by combo box. You hear: "Sort by," followed by the column name, and then "editable combo box." Use the Up and Down arrow keys to select the first column that you want to sort.

  4. Press the Tab key until you find the Sort On combo box. You hear: "Sort on, Cell Values, editable combo box." If you don't hear "Cell Values," press the Up and Down arrow keys until you do.

  5. To select how you want to sort the cell values, press the Tab key until you find the Order combo box. You hear: "Order," followed by the currently selected option, and then "editable combo box." Use the Up and Down arrow keys to select A to Z, Z to A, Smallest to Largest, or Largest to Smallest.

  6. To add another column to sort by, use the Tab key to move to the Add Level button, press Enter, and then repeat steps three through five.

    Note: The Sort By combo box is called Then By for the additional columns.

  7. To reapply a column sort after you change the data, select a cell in the range or table and then press Ctrl+Alt+L.

    Note: Ctrl+Alt+L does not reapply a row sort.

Tips for issues with sorting

If you get unexpected results when sorting your data:

  • Check to see if the values returned by a formula have changed. If the data that you have sorted contains one or more formulas, the return values of those formulas might change when the worksheet is recalculated. In this case, make sure that you reapply the sort to get up-to-date results.

  • Unhide rows and columns before you sort. Hidden columns are not moved when you sort columns, and hidden rows are not moved when you sort rows. Before you sort data, it's a good idea to unhide the hidden columns and rows.

  • Check the locale setting. Sort orders vary by locale setting. Make sure that you have the proper locale setting in Regional Settings or Regional and Language Options in Control Panel on your computer.

  • Turn on or off the heading row. It's usually best to have a heading row when you sort a column to make it easier to understand the meaning of the data. By default, the value in the heading is not included in the sort operation. Occasionally, you might need to turn the heading on or off so that the value in the heading is or is not included in the sort operation.

  • To exclude the first row of data from the sort because it's a column heading, press Alt+H, S, U. In the Custom Sort dialog box, select the My data has headers checkbox.

  • To include the first row of data in the sort because it is not a column heading, press Alt+H, S, U. In the Custom Sort dialog box, clear the My data has headers checkbox.

Filter data in a table

When you put your data in a table, Excel automatically adds an AutoFilter dropdown menu to each column header. You can open this menu to filter quickly. To remove the AutoFilter dropdown menu from a column heading, select the header and then press Ctrl+Shift+L.

  1. In the table header of the column you want to filter, press Alt+Down arrow key. The AutoFilter dropdown menu opens, and with Narrator, you hear: "Menu." With JAWS, you hear: "Context menu." With NVDA, you hear: "Unknown."

  2. On the AutoFilter menu, if the column has numbers, use the Down arrow key to move to Number Filters and press Enter. If the column has text entries, use the Down arrow key to move to Text Filters and press Enter. The submenu opens, and you hear: "Equals."

  3. To move to the filtering option you want, use the arrow keys and press Enter. The Custom AutoFilter dialog box opens, and you hear: "Custom AutoFilter."

  4. Type or select your filtering conditions.

    For example, to show numbers above a certain amount, select Greater Than Or Equal To, and then enter the number you have in mind in the next combo box.

    To filter by two conditions, enter filtering conditions in both sets of edit combo boxes. For both the conditions to be true, press Shift+A to select the And condition. For either of the conditions to be true, press Shift+O to select the Or condition.

  5. To close the dialog box, press the Tab key until you hear "OK button," and then press Enter.

Filter data in a range

  1. Select the cells you want to filter. Navigate to the cell which you want to be the top left cell of the selection, and then hold down Shift and use the Right and Down arrow keys to expand the selected range of cells.

  2. Press Ctrl+Shift+L. Excel adds an AutoFilter dropdown menu to the first cell of each column in the range.

  3. In the table header of the column you want to filter, press Alt+Down arrow key. The AutoFilter dropdown menu opens, and with Narrator, you hear: "Menu." With JAWS, you hear: "Context menu." With NVDA, you hear: "Unknown."

  4. Use the arrow keys and the Tab key to move to the filtering options you want. Use Spacebar to clear or select a filter value checkbox.

  5. When you've made your selections, press Enter to apply the filter.

To clear the filter and remove the AutoFilter dropdown menus, select any cell in the range and press Ctrl+Shift+L.

See also

Use a screen reader to title a table in Excel

Use a screen reader to add comments to an Excel worksheet

Use a screen reader to create column headers in a table in Excel

Keyboard shortcuts in Excel

Basic tasks using a screen reader with Excel

Set up your device to work with accessibility in Microsoft 365

Use a screen reader to explore and navigate Excel

What's new in Microsoft 365

Technical support for customers with disabilities

Microsoft wants to provide the best possible experience for all our customers. If you have a disability or questions related to accessibility, please contact the Microsoft Disability Answer Desk for technical assistance. The Disability Answer Desk support team is trained in using many popular assistive technologies and can offer assistance in English, Spanish, French, and American Sign Language. Please go to the Microsoft Disability Answer Desk site to find out the contact details for your region.

If you are a government, commercial, or enterprise user, please contact the enterprise Disability Answer Desk.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.