Filter Formula in Google Sheets
In Google Sheets, you can use the FILTER function to filter data based on criteria you specify. The FILTER function returns an array of values that meet the criteria you specify. Here's the syntax for the FILTER function:
FILTER(range, condition1, [condition2, ...])
Where:
- "range" is the range of cells you want to filter.
- "condition1" is the first criteria you want to use to filter the data.
- "[condition2, ...]" are any additional criteria you want to use to filter the data. These are optional.
Let's say you have a sheet with data about employees, including their names, departments, and salaries. To filter this data to show only the employees in the sales department who make more than $50,000 per year, you could use the following formula:
=FILTER(A2:C12, B2:B12="Sales", C2:C12>50000)
This formula filters the data in the range A2:C12 based on two conditions:
- The department is "Sales" (B2:B12="Sales").
- The salary is greater than $50,000 (C2:C12>50000).
No comments:
Post a Comment