Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Excel Filter Sort Multiple Columns: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To filter and sort by multiple columns in Excel, turn your data into a table or select the whole range, open the Data tab, and use Filter to add drop-downs. Then apply a sort with multiple levels via Data > Sort, or use each column's filter drop-down to narrow rows. The key is that Excel treats the first row as headers, so keep headers in row 1 and avoid blank rows or columns inside the data.

What You'll Need

  • Excel for Windows, Mac, or Excel for the web. Menu labels can differ slightly by version, device, or region.
  • Data arranged in a single contiguous range with one header row and no merged cells.
  • No completely blank rows or columns inside the data, because these break the range Excel detects.

Step-by-Step

  1. Prepare the data. Put column headers in row 1, one header per column, with no merged cells. Remove blank rows and columns inside the data. If you have totals or notes below the data, leave one blank row between the data and those notes so they are not treated as records.
  2. Select the data range. Click any cell inside the data and press Ctrl+A (Windows) or Command+A (Mac) to select the current region, or drag to select the full range including headers.
  3. Turn the range into a table (recommended). Press Ctrl+T (Windows) or Command+T (Mac), confirm the header checkbox, and click OK. A table expands automatically as you add rows and keeps filters attached. If you prefer not to use a table, skip this step; filters still work on a plain range.
  4. Add filter drop-downs. Go to the Data tab and click Filter. Each header now shows a drop-down arrow. In Excel for the web, the Filter button is on the Data tab as well; on mobile apps the layout differs and some filter options are simplified.
  5. Apply a multi-level sort first. With a cell in the data selected, go to Data > Sort. In the Sort dialog, set Sort by to your first column, then click Add Level and set Then by to your second column. Add more levels as needed. Check that My data has headers is ticked so header names appear in the lists. Click OK. Excel sorts by the first level, then breaks ties with the next level, and so on.
  6. Filter each column. Click the drop-down arrow on a column header. Untick Select All, tick only the values you want, and click OK. Repeat on other columns. Filters combine with AND logic: a row must match every active filter to remain visible. For text columns, use Text Filters for contains, begins with, or equals. For numbers, use Number Filters for greater than, between, and similar. For dates, use Date Filters.
  7. Combine filter and sort. You can sort while filters are active. Use the drop-down's Sort A to Z or Sort Z to A for a quick single-column sort, or reopen Data > Sort for a multi-level sort. Sorting a filtered list reorders only the visible rows within the current filter; clearing the filter restores the full set in the new order.
  8. Review the result. Check the row numbers on the left: hidden rows show gaps or blue row numbers depending on version. The status bar often shows how many records are visible out of the total.
  9. Clear or remove filters. To clear filters but keep the drop-downs, go to Data > Clear (in the Sort & Filter group). To remove the drop-downs entirely, click Filter again to toggle it off. In a table, the drop-downs stay as part of the table design.

Common Mistakes

  • Blank rows or columns inside the data. Excel stops detecting the range at the gap, so later rows are excluded from the sort or filter. Delete or fill the gaps first.
  • Merged header cells. Merged cells prevent Excel from reading headers correctly and can block sorting. Unmerge and put one label per column.
  • Sorting only a selected column. If you select one column and click Sort A to Z, Excel may ask whether to expand the selection. Choosing the wrong option scrambles row relationships. Always expand the selection or, better, select the whole range or use a table.
  • Expecting OR logic between columns. Standard filters combine with AND. For OR conditions across columns, use Advanced Filter with a criteria range, or add a helper column with a formula.
  • Forgetting that hidden rows stay hidden. Copying a filtered range copies only visible cells by default in many cases, but pasting elsewhere can include hidden rows if you are not careful. Use Go To Special > Visible cells only when you need to copy just what is shown.

Tips

  • Use a table (Ctrl+T) so filters, formatting, and formulas extend automatically when you add rows.
  • Name your data range or table for easier reference in formulas and Advanced Filter.
  • For repeated multi-column sorts, record the steps with the Macro Recorder, or save the sort as part of a table's default view where available.
  • Use Number Filters > Between and Date Filters > Between for ranges rather than ticking many individual values.
  • Keep a backup copy before large re-sorts, especially if formulas reference row positions.
  • If you need to sort by a custom order (for example, Low, Medium, High), use Data > Sort > Order > Custom List.

Troubleshooting

  • Sort changes the wrong rows. Undo immediately with Ctrl+Z (Command+Z on Mac). Then select the entire data range including headers and sort again, confirming My data has headers.
  • Filter drop-downs are missing. Click a cell inside the data and check the Data tab; the Filter button may be toggled off. If the sheet is protected, filters may be disabled until you unprotect it.
  • Some rows never appear regardless of filter. Those rows are probably outside the detected range because of a blank row above them. Select the full intended range and reapply Filter.
  • Sort dialog shows Column1, Column2 instead of headers. The My data has headers checkbox is unticked, or the header row contains blanks or duplicates. Fix headers and retry.
  • Filters behave oddly after pasting data. Pasting can leave inconsistent formats or hidden rows. Clear filters, check for hidden rows, and reapply.
  • Shared workbook issues. Some filter and sort features are limited in shared workbooks or co-authoring sessions. If options are greyed out, check whether the file is shared or protected.

Frequently Asked Questions

Can I filter and sort by more than one column at once?

Yes. Use Data > Sort with Add Level for multi-column sorting, and apply filters on multiple column drop-downs. Filters combine with AND logic, so each row must match all active filters.

Does sorting a filtered list reorder hidden rows?

Sorting while a filter is active reorders the visible rows according to the sort keys. Hidden rows remain hidden until you clear the filter, at which point the full list reflects the new order.

How do I filter for OR conditions across different columns?

Standard drop-down filters use AND. For OR across columns, use Advanced Filter with a criteria range, or create a helper column with a formula that returns TRUE for rows matching any condition, then filter that column.

Why does Excel say it cannot sort because cells are merged?

Merged cells block sorting. Select the range, use Home > Merge & Center to unmerge, fill the labels into the now-separate cells, and sort again.

Can I save a filter and sort setup for reuse?

You can save the workbook with filters applied, but the exact filter state is not a named, reusable view in all versions. For repeatable multi-level sorts, consider recording a macro or using a table with consistent filters.

Do filters work the same in Excel for the web and mobile?

Excel for the web supports filters and multi-level sort through the Data tab, though some advanced options are reduced. Mobile apps offer simplified filtering and sorting; for full control, use the desktop app.