What is the FILTER function used for?
The FILTER function in Google Sheets is a powerful tool for filtering data based on specific conditions. This function will take your data set and only return (i.e., display to you) the rows of data that meet the criteria you specify (e.g., only the rows corresponding to Customer A).This helps users display only the rows of data that meet specific criteria, making data analysis and understanding easier.- Range of values: Data to be filtered on the Google Sheet.
- Condition 1: Condition 1 is the column or row containing true or false values corresponding to the first column or row of the data to be filtered.
- Condition 2…: Condition 2 is additional conditions with the data to be filtered.
- Filtering a range of data based on criteria you specify.
- Used to return multiple criteria.
- Used to return multiple criteria and sort.
| Tên | Sản phẩm |
| Hoa | Viết |
| Lan | Thước |
| Cúc | Tập |
| Cúc | Sách |
| Lan | Bút Chì |
| Hoa | Màu Nước |
| Lan | Máy Tính |
How to Use the FILTER Function in Google Sheets
Are you struggling to manage and analyze data in Google Sheets? Do you want to find a tool to quickly and effectively filter data? The FILTER function is the perfect solution for you! Here's the simplest way to use the FILTER function in Google Sheets:Using the FILTER function to apply multiple conditions
The FILTER function in Google Sheets is used to conditionally filter data in Excel with the syntax =FILTER(A1:E16,B1:B16='MALE”Nesting multiple FILTER functions
Function structure: =FILTER(FILTER(range;condition);condition)By using the output of your first FILTER function as the [range of values] for the second FILTER function.Example: We use the data from the previous example, use the first FILTER function to filter values greater than 100 and the second FILTER function to filter values greater than 400.Step 1: Select any cell in the data table > Enter the formula =FILTER(FILTER(A1:A10;A1:A10>100);A1:A6>400)Referencing multiple columns in FILTER function
The FILTER function in Google Sheets allows you to filter data based on conditions and return values that meet those conditions. In case you want to reference multiple columns for the FILTER function, you can use the following syntax:=FILTER(A1:B20,A1:A20 > 50,B1:B20 > 50)Referencing cells in the condition part of the FILTER function
Instead of encoding a value in [condition 1], you can simply reference another cell containing the condition to be checked. This way, you can easily change the condition to be checked or use other parts of the spreadsheet analysis tool to complete the FILTER function.Filtering products with values greater than cell E1. Therefore, we have the condition A1:A20>E1. =FILTER(A1:A10;A1:A10>E1) as shown in the figure.Combining SORT and FILTER functions
SORT function is used to sort the rows of a given range of cells based on the value(s) of one or more columns. SORT function assists users in sorting data in ascending or descending order.To combine SORT with FILTER, we use the formula=SORT(FILTER(range; condition1; [condition2; …]); sort_column; ascending_order; [sort_column2; …]; [ascending_order2; …])- FILTER(range; condition1; [condition2; …]): The filtered data range to be sorted.
- sort_column: The index of the data column or a column outside the range containing values you want to sort.
- ascending_order: TRUE to sort sort_column in ascending order. FALSE to sort sort_column in descending order.
- [sort_column2; …]; [ascending_order2; …]: Similar to sort_column and ascending_order arguments.
- FILTER(A2:A15;C2:C15=F1): Filter products by supplier.
- 1: The data column to be sorted is the product column.
- FALSE: Sort in descending order.
Some data types supported by FILTER function for filtering
The FILTER function is an incredibly powerful tool in Google Sheets that helps you filter data based on various criteria. It can be used to filter data by various data types, including:Combine with COUNT function
Consider the following data table to perform the task of combining with COUNT function, combining with SUM function, combining with SORT function, and combining with multiple conditions:| Date | Value | Product |
| 27/05/2021 | 333 | Dog |
| 28/05/2021 | 100 | Cat |
| 29/05/2021 | 400 | Dog |
| 30/05/2021 | 500 | Tiger |
| 06/06/2021 | 700 | Cat |
| 01/06/2021 | 100 | Dog |
