How to Add a Filter to a Spreadsheet
In this article
Adding a filter to a spreadsheet lets you show only the rows that match criteria you set, such as a date range, a product name, or a number above a threshold, while leaving the hidden rows intact. The exact steps depend on the app, but in Google Sheets and Microsoft Excel the core method is the same: select your data range, turn on the filter, then use the drop-down arrows in the header row to choose what to display. Before you start, make sure your data has a single header row with no merged cells and no completely blank rows or columns inside the range, because filters rely on that structure to work correctly.
What You'll Need
- A spreadsheet open in Google Sheets (web browser) or Microsoft Excel (desktop or web). The steps below cover both; mobile apps have a simplified filter menu.
- Data arranged in columns with one header row at the top. Each column should contain one type of information (dates, names, amounts).
- No merged cells in the header row and no blank rows splitting the data, as these can confuse the filter range.
Step-by-Step
- Select your data range. Click any cell inside your table. In Google Sheets, press Ctrl+A (Cmd+A on Mac) once to select the current data block, or drag to highlight the full range including headers. In Excel, click any cell in the table and press Ctrl+A, or go to Home > Editing > Sort & Filter and choose Filter after selecting the range. Menu labels can differ slightly by version, device, and region.
- Turn on the filter. In Google Sheets, go to Data > Create a filter. In Excel, go to Data > Filter (or press Ctrl+Shift+L). Small drop-down arrows appear in each header cell.
- Open a column's filter menu. Click the arrow in the header of the column you want to filter, for example the Date column. A panel opens listing the values in that column.
- Choose your criteria. In Google Sheets, use the checkboxes to tick only the values you want, or click "Filter by condition" to pick options such as "Text contains", "Date is after", or "Greater than". In Excel, tick values in the list or use the search box, or switch to the Number Filters or Date Filters submenu for conditions like "Between" or "After".
- Apply the filter. Click OK (Excel) or the confirmation button in the panel (Google Sheets). Only matching rows remain visible; the rest are hidden, not deleted.
- Add more filters if needed. Repeat steps 3 to 5 on other columns. Filters combine, so a row must match every active filter to stay visible.
- Check the result. Look at the row numbers: gaps show hidden rows. In Google Sheets the filter icon in the header turns solid to show an active filter; in Excel the header arrow changes to a funnel symbol.
- Clear or remove the filter when done. To show all rows again, open the filter menu and choose "Clear" or "Select all", or in Google Sheets go to Data > Remove filter. In Excel, click Data > Filter again to toggle it off, or use Clear in the Sort & Filter group.
Common Mistakes
- Leaving blank rows or columns inside the range. The filter may stop at the gap, so rows below it are ignored. Delete empty rows or select the full range manually before creating the filter.
- Including a title row above the headers. If row 1 is a merged title and row 2 holds the headers, the filter treats row 1 as headers. Keep headers in the first row of the selected range.
- Filtering a single column instead of the table. If you select only one column before turning on the filter, other columns will not hide in line with it, leaving mismatched data on screen.
- Typing over hidden rows. Editing a visible cell does not affect hidden rows, but sorting or pasting into a filtered range can put data in the wrong rows. Clear the filter before large edits.
- Expecting the filter to delete data. Filters only hide rows. To remove them permanently, delete the rows or copy the visible results to a new sheet.
Tips
- Format your header row in bold so it is easy to see where the filter range starts.
- Use "Filter by condition" rather than ticking dozens of values when you need a range, such as all dates in a month.
- In Google Sheets, you can create a filter view (Data > Filter views) to save a set of criteria without changing what other people see in a shared file.
- Convert your range to an Excel Table (Insert > Table) so new rows you type at the bottom are included in the filter automatically.
- Freeze the header row (View > Freeze > 1 row in Google Sheets; View > Freeze Panes in Excel) so the filter arrows stay visible as you scroll.
Troubleshooting
- The filter arrows do not appear. Make sure you selected a range that includes a header row and that the sheet is not protected. In Excel, check that the workbook is not in a mode that blocks editing.
- Some rows will not hide. Look for blank rows inside the range or a second table directly below. Select the exact range and reapply the filter.
- Only part of the table filters. You probably created the filter on one column. Remove it and select the whole table before choosing Data > Create a filter or Data > Filter.
- Values are missing from the filter list. Hidden or filtered-out rows may not show in the list until you clear other filters. Also check for extra spaces in cells, which create separate entries.
- The filter seems stuck. Clear all filters, save, and reload the page or restart the app. If the file is shared, check whether someone else has a filter view active.
Frequently Asked Questions
Does adding a filter delete rows?
No. A filter only hides rows that do not match your criteria. The data stays in the sheet and reappears when you clear the filter.
Can I filter by more than one column at once?
Yes. Apply a filter to one column, then another. A row must match every active filter to remain visible.
How do I remove a filter completely?
In Google Sheets, go to Data > Remove filter. In Excel, go to Data > Filter to turn it off, which also clears the criteria.
Why can't I see the filter option?
The sheet may be protected or in a view-only mode, or you may have selected a single cell in an empty area. Select the data range first, then look under the Data menu.
Can I save a filter for later?
In Google Sheets, use Data > Filter views to save criteria without affecting other viewers. In Excel, the filter settings are saved with the workbook when you save the file.
Do filters work on mobile?
Yes, but the menus are simpler. In the Google Sheets app, tap the column header and use the filter icon; in the Excel app, open the table and use the filter arrows in the header row. Options vary by app version.