Google Sheets: Sorting and Filtering Data (2024)

Table of Contents
Introduction Challenge! FAQs

Lesson 16: Sorting and Filtering Data

/en/googlespreadsheets/working-with-functions/content/

Introduction

Google Sheets allows you to analyze and work with a significant amount of data. As you add more content to your spreadsheet, organizing information in it becomes important. Google Sheets allows you reorganize your data by sorting and applying filters to it. You can sort your data by arranging it alphabetically or numerically, or you can apply a filter to narrow down the data and hide some of it from view.

In this lesson, you will learn how to sort data to better view and organize the contents of your spreadsheet. You will also learn how to filter data to display only the information you need.

Types of sorting

When sorting data, it's important to first decide if you want the sort to apply to the entire sheet or to a selection of cells.

  • Sort sheet organizes all of the data in your spreadsheet by one column. Related information across each row is kept together when the sort is applied. In the image below, the Name column has been sorted to display client names in alphabetical order. Each client's address information has been kept with each corresponding name.

    Google Sheets: Sorting and Filtering Data (1)

  • Sort range sorts the data in a range of cells, which can be helpful when working with a sheet that contains several tables. Sorting a range will not affect other content on the worksheet.

    Google Sheets: Sorting and Filtering Data (2)

To sort a sheet:

In our example, we'll sort a list of customers alphabetically by last name. In order for sorting to work correctly, your worksheet should include a header row, which is used to identify the name of each column. We will freeze the header row so the header labels will not be included in the sort.

  1. Click View and hover the mouse over Freeze. Select 1 row from the menu that appears.Google Sheets: Sorting and Filtering Data (3)
  2. The header row freezes. Decide which column will be sorted, then click a cell in the column.

    Google Sheets: Sorting and Filtering Data (4)

  3. Click Data and select Sort Sheet by column, A-Z (ascending) or Sort Sheet by column, Z-A (descending). In our example, we'll select Sort Sheet by column, A-Z.

    Google Sheets: Sorting and Filtering Data (5)

  4. The sheet will be sorted according to your selection.

    Google Sheets: Sorting and Filtering Data (6)

To sort a range:

In our example, we'll select a secondary table in a T-shirt order form to sort the number of shirts that were ordered by class.

  1. Select the cell range you want to sort. In our example, we'll select cell range G3:H6.

    Google Sheets: Sorting and Filtering Data (7)

  2. Click Data and select Sort range from the drop-down menu.

    Google Sheets: Sorting and Filtering Data (8)

  3. The Sorting dialog box appears. Select the desired column you want to sort by.

    Google Sheets: Sorting and Filtering Data (9)

  4. Select ascending or descending. In our example, we'll select descending (Z-A). Then click Sort.

    Google Sheets: Sorting and Filtering Data (10)

  5. The range will be sorted according to your selections (in our example, the data has been sorted in descending order according to the Orders column).

    Google Sheets: Sorting and Filtering Data (11)

To create a filter:

In our example, we'll apply a filter to an equipment log worksheet to display only the laptops and projectors that are available for checkout. In order for sorting to work correctly, your worksheet should include a header row, which is used to identify the name of each column. We will freeze the header row so the header labels will not be included in the filter.

  1. Click View and hover the mouse over Freeze. Select 1 row from the menu that appears.

    Google Sheets: Sorting and Filtering Data (12)

  2. Click any cell that contains data.

    Google Sheets: Sorting and Filtering Data (13)

  3. Click the Filter button.

    Google Sheets: Sorting and Filtering Data (14)

  4. A drop-down arrow appears in each column header.

    Google Sheets: Sorting and Filtering Data (15)

  5. Click the drop-down arrow for the column you want to filter. In our example, we will filter column B to view only certain types of equipment.

    Google Sheets: Sorting and Filtering Data (16)

  6. Click Clear to remove all of the checks.

    Google Sheets: Sorting and Filtering Data (17)

  7. Select the data you want to filter, then click OK. In this example, we will check Laptop and Projector to view only these types of equipment.

    Google Sheets: Sorting and Filtering Data (18)

  8. The data will be filtered, temporarily hiding any content that doesn't match the criteria. In our example, only laptops and projectors are visible.

    Google Sheets: Sorting and Filtering Data (19)

Applying multiple filters

Filters are cumulative, which means you can apply multiple filters to help narrow down your results. In this example, we've already filtered our worksheet to show laptops and projectors, and we'd like to narrow it down further to only show laptops and projectors that were checked out in August.

  1. Click the drop-down arrow for the column you want to filter. In this example, we will add a filter to column D to view information by date.

    Google Sheets: Sorting and Filtering Data (20)

  2. Check or uncheck the boxes depending on the data you want to filter, then click OK. In our example, we'll uncheck everything except for August.

    Google Sheets: Sorting and Filtering Data (21)

  3. The new filter will be applied. In our example, the worksheet is now filtered to show only laptops and projectors that were checked out in August.

    Google Sheets: Sorting and Filtering Data (22)

If you're collaborating with others on a sheet, you can create a filter view. Creating a filter view allows you to filter data without affecting other people's view of the data; it only affects your own view. It also allows you to name views and save multiple views. You can create a filter view by clicking the drop-down arrow next to the Filter button.

Google Sheets: Sorting and Filtering Data (23)

To clear all filters:

  • Click the Filter button, and the spreadsheet will return to its original appearance.

    Google Sheets: Sorting and Filtering Data (24)

Challenge!

  1. Open our example file. Make sure you're signed in to Google, then click File > Make a copy.
  2. Select the Equipment Log tab if it is not already open.
  3. Freeze row 1.
  4. Sort the spreadsheet by the Checked Out date from most recent to the oldest.
    Hint: Sort by column D from Z to A.
  5. Sort the range A2:F9 by column B from A to Z.
    Hint: Make sure the box next to data has header row is left unchecked.
  6. Filter the spreadsheet so it only shows equipment that has never been checked in.
    Hint: Filter column E to show cells that are empty.
  7. When you're finished, your spreadsheet should look like this:

    Google Sheets: Sorting and Filtering Data (25)

Google Sheets: Sorting and Filtering Data (27)

Previous: Working with Functions

Next:Understanding the New Google Sheets

Google Sheets: Sorting and Filtering Data (28)

/en/googlespreadsheets/understanding-the-new-google-sheets/content/

Google Sheets: Sorting and Filtering Data (2024)

FAQs

How do I filter answers in Google Sheets? ›

To see filter options, go to the top of the range and click Filter .
  1. Filter by condition: Choose conditions or write your own custom formulas. ...
  2. Filter by values: To hide data points, uncheck the box next to the data point and click OK. ...
  3. Search: Search for data points by typing in the search box.

What features can you use in Google Sheets to analyze data efficiently answer? ›

Pivot tables in Sheets help you summarize data, find patterns, and reorganize information. You can add pivot tables based on suggestions in Google Sheets or create them manually.

Can you sort and filter in Google Sheets? ›

Create a filter.

The "Sort and filter" menu will open. Type in the search bar to find a value or scroll up on the list to see the values in the column. Tap an item to uncheck it and filter it out. The sheet will update automatically.

How to do complex sorting in Google Sheets? ›

How to sort by multiple columns in Google Sheets
  1. Highlight your cell range, including the column headers.
  2. Click Data > Sort range > Advanced range sorting options.
  3. Click Data has header row. ...
  4. Click the dropdown next to Sort by and select the first column you want to sort on. ...
  5. Click Add another sort column.
Jan 22, 2024

How do I sort responses in Google Sheets? ›

Here's what you'll do:
  1. Highlight the range you would like to sort.
  2. Freeze the header row, if your sheet has one.
  3. Go to Data in the top menu. Then, go to Sort Range > Advanced Range.
  4. Select Data has a header row if your columns have titles.
  5. Select a column to sort and the sorting rule. ...
  6. Click sort.
Nov 29, 2023

How do I get answers in Google Sheets? ›

On your computer, open a spreadsheet in Google Sheets. If you want to ask questions about data that's on a different sheet, at the top right click Edit and make your changes. Under "Answers," enter your question in the box and press Enter. To find answers, click the question under the text box.

What is the difference between sort by sheet and sort range in Google Sheets? ›

Sorting by sheet means organizing all of the data in your Google spreadsheet by one column. Sorting by range means only sorting data within a range of cells in your spreadsheet.

How to automatically sort data in Google Sheets? ›

Sort sheet by a column in Google Sheets

Select the column to sort by. To do this, select any cell of the required column. Go to the Data menu and select the alphabetical order for sorting: Sort sheet by {selected-column} , A to Z.

How do I use custom sort in Google Sheets? ›

Step 1: In Google Sheets, open your existing file or create a new data set. Step 2: Select the range of data to custom sort > right click > select “View more cell actions” and “Sort range”. “Data has header row” - Check this box if your data range includes the header.

How to advanced Sort in Google Sheets? ›

You can also sort your data in Google Sheets using some advanced range sorting options. To enable this feature, select "Data" from the top menu then select "Sort range" from the drop-down menu. Next, click "Advanced sorting options."

How do I Sort only certain cells in Google Sheets? ›

To sort a range:
  1. Select the cell range you want to sort. ...
  2. Click Data and select Sort range from the drop-down menu.
  3. The Sorting dialog box appears. ...
  4. Select ascending or descending.

What is a slicer in Google Sheets? ›

In Google Sheets, slicers are user-friendly, interactive objects that allow users to filter data within charts, tables, and pivot tables. A slicer acts as a visual filter, providing a straightforward way for users to filter by value or filter by condition, without diving into complex menu options.

How do I filter information in Google Sheets? ›

How to create a filter in Google Sheets
  1. Select the range. For Google Sheets to filter your whole table, just click a single cell within it and proceed to step 2 — turning the filter on. ...
  2. Turn Google Sheets filter on. Then either go to Data > Create a filter in the Google Sheets menu:
May 20, 2024

How to filter Google Form responses? ›

Go to Results>Responses section.
  1. You will see an icon on the right side of the response search bar.
  2. Click on the icon and set up your filtering preferences.
  3. If you like, you can also create advanced filters with conditions.
  4. And just like this! Now, you will see only the responses that match with your filters.

How do I color code answers in Google Sheets? ›

Use conditional formatting rules in Google Sheets
  1. On your computer, open a spreadsheet in Google Sheets.
  2. Select the cells you want to apply format rules to.
  3. Click Format. Conditional formatting. ...
  4. Create a rule. Single color: Under "Format cells if," choose the condition that you want to trigger the rule. ...
  5. Click Done.

Top Articles
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 5604

Rating: 5 / 5 (50 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.