Sorting, Filtering and Data Tools

Put the rows in order, see only the ones you need, and keep the data tidy.

Sort

  • Data > Sort Sheet > A to Z or Z to A sorts every row by the selected cell's column. Frozen rows at the top stay where they are, as a header.
  • Data > Sort Range sorts only the selected cells. Advanced Range Sorting Options sorts by several columns in turn and skips a header row.
  • Right-click a column letter for Sort Sheet A to Z and Sort Sheet Z to A.

Filters

Data > Create a Filter, or the funnel on the toolbar, puts a button on each column's header. Press one to filter that column by its values, by a condition such as Greater than or Text contains, or by colour, and to sort by it. The rows the filter hides are hidden for everyone; turn the filter off to show them all again.

Right-click a cell and choose Filter by Cell Value to see only the rows that match it.

Filter views and group by views

A filter view filters and sorts only for you, so everyone can look at the data their own way without changing what others see.

  • Data > Create Filter View opens a new one; give it a name to keep it, and open it again from the funnel's arrow on the toolbar.
  • Create Group by View, in a table, groups its rows by one or more columns, each group under a heading with its count.
  • Close View goes back to the sheet as everyone sees it, and Save as Filter View keeps the filter you made.

Slicers

Data > Add a Slicer puts a filter button on the sheet itself, for one column of a range. Anyone can press it to filter by that column, and you can place it, size it and give it a title like any other object.

Data validation

Data > Data Validation keeps a range to the values you allow: numbers between two values, dates, text that contains a word, an email address, a URL, a formula that must be true, or a list.

  • Insert > Dropdown gives each cell a list to pick from, as chips in the colours you set; a dropdown can allow more than one choice.
  • Insert > Checkbox puts a tick box in each cell; ticked reads as TRUE in formulas.
  • A value outside the rule can be refused, or kept with a warning on its cell.

Conditional formatting

Format > Conditional Formatting colours cells by a rule: when they are empty, contain a word, are above a number or between two dates, match a formula of your own, or are among the highest or lowest. A Colour scale shades a range from its lowest value to its highest. Rules are checked in order and listed in the side panel, where you can change, reorder or remove them.

Protected ranges

Data > Protect Sheets and Ranges keeps a sheet or a range from being changed by mistake: anyone who tries is warned first, or only the spreadsheet's editors, or only its owner, may change it. View the protected ranges with View > Show > Protected Ranges.

Find and replace

Ctrl+F finds a word or number on the sheet. Edit > Find and Replace (Ctrl+H) searches this sheet, every sheet or a range, matching case or the whole cell, inside formulas or with a regular expression, and replaces one at a time or all at once.

Clean-up, split and stats

  • Data > Data Clean-up > Remove Duplicates removes rows that repeat others in the columns you choose, and Trim Whitespace takes stray spaces off the start and end of each value.
  • Clean-up Suggestions looks over the sheet for duplicate rows, extra spaces and numbers kept as text, and fixes each with a press of Apply.
  • Data > Split Text to Columns splits each cell at a comma, semicolon, full stop, space or a separator of your own.
  • Data > Randomise Range shuffles the selected rows.
  • Data > Column Stats shows a column's count, sum, average, lowest and highest values and how often each value appears.

Select some numbers to see their sum at the bottom right; its arrow shows the average, lowest, highest and count instead.

Was this article helpful?