Filter Sort in Google Sheets: Sort Data Without Losing Rows

How-to basics · Updated November 3, 2026

Filter Sort in Google Sheets: Sort Data Without Losing Rows

To filter and sort in Google Sheets, select your table, choose Data > Create a filter, then open a column’s filter menu and choose an ascending or descending sort. The filter hides rows that do not match your criteria; sorting changes row order. Include every column in the table so each record stays together.

What filter and sort mean in Google Sheets

Filtering and sorting are related, but they do different jobs. A filter controls which rows are shown, based on the values in one or more columns. Sorting rearranges rows into an order, such as alphabetical order, earliest to latest, or smallest to largest. You can use either feature alone or combine them: for example, filter a task list to show only open tasks, then sort those rows by due date.

When you create a filter, Sheets adds filter controls to the header cells in the selected range. Those controls let you sort a column or limit the displayed rows. Filtering does not delete records; rows that fail the filter are temporarily hidden. Clearing the filter brings them back. Sorting is also not the same as filtering: it changes the order of records in the range rather than hiding records that do not fit a rule.

A useful way to think about the setup is that a row is one complete record. If a row contains a customer name, order number, date, and amount, sorting should move all four cells together. The filter range therefore needs to cover the entire table, not just the column you want to sort.

How to create a filter and sort a column

  1. Check that the table has a header row with a distinct label for each column. Remove completely blank rows or columns inside the data if they could split the table.
  2. Select the table, including its headers and every column that belongs to each record. If your data is one continuous block, clicking a cell inside it may let Sheets detect the range, but selecting the range yourself makes the scope clear.
  3. Choose Data > Create a filter. Filter controls appear in the header row.
  4. Open the filter control in the column you want to sort. Choose the ascending or descending command shown in the menu. Text is ordered alphabetically, numbers numerically, and dates chronologically when Sheets recognizes the values as those types.
  5. To show only some records, open the relevant filter control and use Filter by values to select listed values, or Filter by condition to set a rule such as text contains, date is, or greater than.
  6. When you want to display all rows again, reopen the relevant filter control and clear the selections or remove the condition. To remove the filter controls entirely, choose Data > Remove filter.

The exact options in a filter menu can depend on the data in the column. A column of text may offer text-based conditions, while a column of dates may offer date conditions. For a quick one-time sort without filter controls, select the range and use Data > Sort range. If the range has a header, use the advanced range sorting options to indicate that the data has a header row.

Choose the right range so records stay together

The most consequential sorting mistake is selecting only one column from a wider table. Suppose columns A through D contain a name, email address, signup date, and status. Sorting just column C can rearrange the dates without moving the names, emails, and statuses that belong to them. The sheet may still look tidy, but its records are now mismatched.

For filter-based sorting, create the filter across the whole table and use the sort command in the column’s filter menu. For a one-time sort, select all the rows and columns that make up the records before opening Data > Sort range. When the range has headers, identify the header row in the sort options so the column labels are not treated as ordinary data.

Be deliberate about totals and notes. A total row at the bottom may be included in a sort if it falls inside the selected range, which can place it among the records. Either keep totals outside the sortable data block or exclude them from the range. Similarly, a note or blank spacer row inside the table can interrupt range detection or be moved in a surprising way.

Filter by values, conditions, and multiple columns

Filter by values is convenient when you want to choose from the values already present. In a list of orders, you could keep only the rows whose status is Pending. The menu may provide a search box, which helps when the column has many distinct values. This approach is direct, but you may need to update the selections when new values appear in the data.

Filter by condition is better when the rule matters more than a fixed list of values. For example, you could show dates after a chosen day, numbers greater than a threshold, or text that contains a word. The available conditions depend on the column’s contents. Check that dates and numbers are stored as actual dates and numbers rather than text that merely looks similar.

You can apply filters in more than one column. For example, a sales table could be filtered to show the West region and then to show orders with a value above a chosen amount. A row must satisfy the active filters to remain visible. This lets you narrow a large table in stages without deleting the rows excluded by one particular condition.

When to use a filter view

A standard filter changes what is displayed in the shared sheet, so collaborators looking at the same sheet can be affected by the current filter settings. A filter view is often a better choice when several people need to explore the same data independently. It lets a person apply and save a particular view without changing the ordinary filter state seen by everyone else.

To make one, choose Data > Filter views > Create new filter view. Set the filter or sort using the controls, and give the view a useful name if you want to find it again. This is helpful for a shared roster where one person needs to see a particular team while another wants to review a different status. Filter views change how data is displayed; they do not create a separate copy of the records.

Use a normal filter when you are working alone or want one shared view for the sheet. Choose a filter view when independent, reusable views are important. If you only need to rearrange the data once and do not need filter controls, sorting a selected range is simpler.

Examples that make filter sorting practical

Imagine a project tracker with columns for task, owner, due date, and status. Create a filter over all four columns. Sort by the due-date column to bring earlier deadlines toward the top, then filter the status column to show only tasks that are not complete. The task name and owner remain attached to each due date because the sort applies to the table’s rows.

For a contact list, create a filter over the complete list and sort by last name. If you want to focus on one city first, use the city filter and then sort by last name. For an inventory sheet, filter the category column to one product type and sort the quantity column so low-stock items are easy to spot. In each example, filtering narrows the displayed records while sorting orders the records that belong to the table.

These examples also show why sorting is not a substitute for filtering. Sorting a list by status groups similar statuses together, but it still displays every status. A filter can hide the statuses you do not want to review right now.

Common problems and how to fix them

  • Values from different records no longer match: The sort may have covered only one column. Undo promptly if possible, then sort the full data range. Before sorting, check that the range includes every field belonging to each record.
  • The header moved into the data: The range may not have been identified as having a header row. In the advanced range sorting options, mark that the data has a header row. With a filter, confirm that the controls are on the actual header cells.
  • Numbers or dates sort unexpectedly: Some entries may be stored as text, or a column may mix different kinds of values. Check the cell format and the underlying values, then make the data consistent before sorting. A date-looking string is not necessarily recognized as a date.
  • Some records are missing: They may be hidden by an active filter rather than deleted. Review the filter menus and clear conditions or restore the values you want to see. Also check whether the filter range covers the full table.
  • A total or note appears in the middle: It may have been included in the sortable range. Keep summary rows outside the data block, or select only the records you intend to sort.
  • The filter control is unavailable or the sort is obstructed: Check whether you selected the correct range and whether the sheet has restrictions that prevent editing. Also review merged cells or unusual blank rows in the data area, which can make a table harder to sort consistently.

If a sort produces an unexpected result, avoid making more edits before deciding whether to undo. Sorting changes the arrangement of cells, so a sequence of later edits can make it harder to restore the original order. For important data, keep a copy or use version history as a recovery option.

Filter sorting compared with other methods

A filter is a good everyday tool for interactive review: it adds dropdowns, lets you sort, and can hide rows using criteria. A filter view is preferable when people need separate saved views of shared data. Data > Sort range is a straightforward choice for a one-time sort, especially when you want to specify the range and sort by more than one column using the range-sorting options.

These approaches do not make a new sorted copy of the data. If you need to preserve the original order, duplicate the data first or create a separate output area using an appropriate Sheets formula. For routine work, avoid maintaining two manually edited versions of the same records: they can become inconsistent as the source changes.

Google Sheets and Excel both offer sorting and filtering, but their menus and some collaboration features differ. The steps here are for Google Sheets in a web browser; Excel’s ribbon commands are not the paths to use in Sheets. In either application, the core safeguard is the same: sort complete records, not an isolated field.

Frequently Asked Questions

How do I sort A to Z in Google Sheets?
Select the full table, choose Data > Create a filter, and open the filter control in the column you want to order. Choose the ascending sort command, usually labeled Sort A to Z. Make sure the filter covers every column in each record.

Can I filter and sort at the same time?
Yes. Create a filter, apply a condition or select the values you want to display, and then use a column’s filter menu to sort. The filter limits which rows are shown; the sort orders records in the data range.

Does filtering delete rows in Google Sheets?
No. A filter hides rows that do not match its settings. Clear the filter selections or conditions to show those rows again. If a row is genuinely deleted, clearing a filter will not restore it.

How do I sort by two columns?
Select the full table and choose Data > Sort range > Advanced range sorting options. Indicate whether the range has a header row, choose the first sort column and order, then add another sort column for the secondary order. For example, sort first by region and then by customer name.

Why is my Google Sheets sort not keeping rows together?
Usually, the sort range includes only the column being ordered rather than the full table. Undo if possible, select the whole table, and repeat the sort. Check that headers, totals, and unrelated notes are handled separately from the records.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.