Google Sheets has features that make sorting and filtering data quick and easy.
Currently, the data in the Sales by Location worksheet is in alphabetical order by location. Let's change this to be organized in ascending order by date.
Before sorting data in Google Sheets, it is important to freeze the header row. This will keep the first row of the worksheet, which contains the column headers, from being sorted with the data.
- To select the header row, on the left side of the worksheet,
- To freeze the header row, on the menu bar,
Click View, Click Freeze, Click 1 row
- Deselect the header row.
- To see options for the Date column,
Point , Click
- To sort by date, in the drop-down menu,
Click Sort sheet A to Z
The data is now in ascending order with the oldest date (6/5/2022) at the top.
Google Sheets also gives us an easy way to filter data. When data is filtered, it is hidden, but not removed. And no data is lost.
Let's filter the data to see just the sales that will benefit the food pantry.
- To create a filter, in the menu bar,
Click Data, Click Create a filter
All of the data is selected. The column headings have small icons to the right.
These icons can be used to open filtering, and sorting, options.
- To open the filtering options, in the Beneficiary column,
The Beneficiary drop-down menu opens:
The drop-down menu has the sorting options at the top. The filtering options are at the bottom of the menu. Each unique value, in this case, Beneficiary, is listed. Removing the checkmark next to a value hides that value.
We want to remove all of the beneficiaries except the Food Pantry. We could uncheck each beneficiary. Or we can clear all of the checkmarks and then check just the Food Pantry entry.
- To deselect all of the beneficiaries, in the middle of the drop-down menu,
- To select just the Food Pantry,
Click Food Pantry
- To accept this filter,
The data has been filtered and only shows the dates and locations when the Food Pantry was the beneficiary.
Notice the row numbers. Only the rows containing the Food Pantry are visible. The other rows are hidden. In addition, the icon next to the column header has changed and now looks like a small filter. This tells anyone who looks at this worksheet that the data is filtered by this column.
- To open the Beneficiary filtering options,
- To remove the filter, in the middle of the drop-down menu,
Click Select all
- To accept this change,