In Excel for Microsoft 365 on Windows, press Ctrl+Shift+L to turn filter buttons on or off for a data range. To sort the current column, click a cell in it and press Alt, A, S, then A for ascending order, or replace the last key with D for descending order; press the keys one after another, not together.
The main shortcuts and what they do
Excel does not use one single shortcut for every sort-and-filter task. The filter shortcut adds or removes dropdown buttons in the header row, while sorting uses a sequence of ribbon key tips. These are the everyday Windows shortcuts:
Ctrl+Shift+L: turn AutoFilter buttons on or off for the current data range. If the active cell is in an Excel table, it toggles the table’s filter buttons.Alt,A,S,A: sort the selected column from smallest to largest, A to Z, or oldest to newest, depending on the values.Alt,A,S,D: sort the selected column from largest to smallest, Z to A, or newest to oldest.Alt,A,S,S: open the Sort dialog, where you can set multiple sort levels and choose a sort basis.
Ribbon key tips can vary with the Office language and interface. If a sequence does not match your installation, press Alt and read the letters shown on the ribbon, or use the Data tab with the mouse. In the sequences above, each key is a separate press.
How to switch filters on and filter a list
First make sure the data has one clear header row, such as Product, Region, and Units Sold, with no blank header cells. Click any cell inside the data and press Ctrl+Shift+L. Excel adds a dropdown arrow to each header. Pressing the shortcut again removes the arrows; it does not erase the records or the header row.
To filter, open a header dropdown and select values or criteria. For example, in a Region column, clear Select All and select West to show only western-region records. You can also use text, number, date, and color filter options where applicable. The dropdown’s search box is useful when a column contains many distinct values.
- Click the dropdown arrow in the column you want to filter.
- Choose specific values, or select a relevant option under Text Filters, Number Filters, or Date Filters.
- Confirm the selection. Rows that do not match are hidden, not deleted.
- Look for the filter indicator in the header to see that a filter is active; reopen the dropdown to change or clear it.
Filters can be applied to more than one column. Filtering Region to West and Status to Open shows rows that meet both conditions. Within a single checklist of values, selecting several items generally shows records matching any selected item; across different columns, the criteria are combined.
Sort a column without separating its records
For a quick sort, click a cell in the column you want to order, then use the ascending or descending key sequence. For example, click a value in Units Sold and use ascending sort to put smaller counts before larger counts. Excel normally recognizes the contiguous data region and sorts whole records together, keeping each row’s related fields aligned.
Be cautious if Excel asks whether to expand the selection. Choose Expand the selection when the adjacent columns belong to the same records. Choosing Continue with the current selection sorts just that column, which can mismatch names, dates, and amounts across rows. If the data is a standalone list with no related columns, sorting only the selected column may be appropriate.
Before sorting, check that the range has a header row and that there are no unexpected blank rows splitting the data. A blank row can cause Excel to treat only part of a list as the sort region. If you are unsure what Excel will include, select the full range first or convert it to a table.
Use the Sort dialog for multiple levels
A quick ascending or descending sort handles one column at a time. For a deliberate multi-column order, open the Sort dialog with Alt, A, S, S, or choose Data > Sort. Check My data has headers if appropriate, then set the first column and order. Use Add Level to add a second or third criterion.
For example, to group a sales list by Region and then put the largest sale first inside each region, set Sort by to Region with order A to Z. Add a level for Sales and choose Largest to Smallest. Excel applies the first level, then sorts records tied at that level using the next one. This is different from sorting Sales first and Region second, which prioritizes sale size across the whole list.
The dialog also supports sorting by cell color, font color, or icon when those formats are present. These choices are useful when color carries meaning, but a visible color should not be the only way to represent an important category; a text status column is easier to filter, audit, and share.
Tables, ranges, and reliable headers
AutoFilter works with ordinary ranges as well as Excel tables. For a regularly updated list, a table is often the more dependable option: select the data and choose Insert > Table, or press Ctrl+T on Windows, then confirm whether the table has headers. Tables add filter arrows and generally extend their structure as you add rows. They also make it easier to keep new records inside the sortable and filterable dataset.
Use short, unique header names and keep one record per row. Avoid merged cells in the header, multiple header rows, and blank columns inside the list. A title above the table is fine, but it should be outside the actual header row. These practices help Excel distinguish labels from records and reduce surprises when sorting or filtering.
When a filter hides rows, the records remain in the worksheet. To restore the display, clear the filter from the relevant dropdown or use Data > Clear to clear filters. To remove the dropdown controls altogether, use Ctrl+Shift+L. Clearing a filter and turning filter buttons off are different actions: clearing shows the matching data again, while toggling the buttons changes whether the controls are displayed.
Windows, Mac, and Excel for the web
The main shortcut sequences above are for Excel for Microsoft 365 on Windows. In Excel for Mac, the common shortcut for toggling filters is Command+Shift+F; menu and shortcut behavior can depend on the keyboard and Excel version. You can use Data > Filter as a dependable menu alternative. The Windows Alt ribbon sequence is not the Mac equivalent; use the Mac ribbon or its displayed keyboard shortcuts for sorting.
Excel for the web may handle some keyboard combinations differently because the browser can reserve shortcuts for its own commands. If a key combination is intercepted, use the Data tab’s Sort and Filter controls. The feature names and basic workflow are similar, but available key tips can differ from the desktop app.
Common problems and safe ways to avoid them
- Only one column moved: undo immediately with
Ctrl+Zif the rows have become mismatched, then sort the complete dataset. When prompted, expand the selection. - The sort order looks wrong: numbers or dates stored as text may sort like words rather than as numeric or date values. Check the cell format and underlying values, and convert inconsistent entries before sorting.
- Some records did not sort: a blank row or column may have broken the range into separate regions. Remove unintended gaps or select the complete range before sorting.
- New rows are missing from the filter: they may have been entered outside the filtered range. Add them inside the range or use a table that can expand with new records.
- The filter seems to hide data permanently: filtering hides nonmatching rows; it does not delete them. Clear the filter to display the full list again.
If the workbook matters, save it before a complex sort, especially when multiple columns or custom levels are involved. Sorting changes row order, and that can affect formulas or assumptions elsewhere in a workbook even when the underlying records stay together. A quick check of the first and last records after sorting can catch an unintended range.
Frequently Asked Questions
What is the shortcut to add filters in Excel?
In Excel for Microsoft 365 on Windows, press Ctrl+Shift+L while a cell in the data range is selected. Press it again to remove the filter buttons.
What is the keyboard shortcut to sort A to Z?
Click a cell in the column, then press Alt, A, S, A in sequence. Excel sorts the data region by that column in ascending order.
How do I sort by two columns?
Open Data > Sort, select the first column and order, choose Add Level, and set the next column. The first level has priority; later levels order records within ties.
Does filtering delete rows in Excel?
No. A filter hides rows that do not meet the criteria. Clear the filter to show them again; deleting records is a separate action.
Why did sorting mix up my rows?
Usually only one column was sorted instead of the complete set of related records. Undo the sort, select the full range, and sort again, or choose Expand the selection when Excel offers it.
Related
- Excel Print Zoom to Fit Page: Setup and Common Fixes
- Excel Print: Keep Row and Column Headers on Every Page
- Excel Print Header on Each Page: Repeat Rows in Print
Try it: the Formula Explainer: paste any formula and see each function and reference in plain English.
More in Formulas & functions
- Excel COUNTIF and SUMIF With Dates: Practical ExamplesTo count or sum rows by date in Excel, use COUNTIF or SUMIF with a date criterion; for…
- DAX Function in Excel: What It Does and How to Use ItDAX in Excel is a formula language for calculations in the workbook Data Model, used through Power Pivot…
- Excel SUMIFS With One Criterion: Formula and ExamplesTo sum values in Excel when one condition is true, use SUMIFS with one criteria range and one…
- Excel Biweekly Timesheets: Setup and Formula GuideYes. Excel can track biweekly timesheets by recording each shift in a 14-day date range, calculating hours, and…
- How to Calculate a Unique Count in Excel with FormulasTo count distinct, nonblank values in Excel for Microsoft 365, use =IFERROR(ROWS(UNIQUE(FILTER(A2:A100,A2:A100<>""))),0), replacing A2:A100 with your data range.…
- Excel LAMBDA Formula Examples for Reusable FunctionsExcel LAMBDA lets you turn a calculation into a reusable function, so you can name it once and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.