Зміст курсу
Excel Formulas
Excel Formulas
FILTER
The FILTER function in Excel is designed to filter a range of data based on specified criteria and return the matching values. This function is highly useful for data analysis, reporting, and data management tasks.
array | The range or array to filter. |
include | A Boolean array, where TRUE represents the values to include. |
[if_empty] | (Optional) The value to return if no entries meet the criteria. If omitted, it returns a #CALC! error. |
So, again, nothing too complicated. First, we provide a range we want to filter. The next parameter, as specified above, is a Boolean array, but where can we find it? Actually, a Boolean array is simply a range of True or False values. We can take any range and turn it into a Boolean array with an array formula.
What we did here is just applied a condition to the range of values. We can acheave it using >
, <
, =
and so on.
Suppose you have a list of sales data with product names in column A and sales figures in column B. You want to filter out only the products with sales greater than 250.
First, select column A where the product names are listed. Next, create a boolean array to identify which products meet the sales criteria. You can create this array separately and then use it, or you can integrate it directly into the formula.
Note
If no products have a count greater than the specified threshold, you will get a
#CALC!
error. To prevent this, you can specify a third parameter in the formula that will be displayed if there is no match.
Дякуємо за ваш відгук!