Thursday, 30 January 2025

filter

 The FILTER function in Excel is a powerful tool that allows you to filter a range of data based on specified criteria. Below are 10 examples of how to use the FILTER function, including both data and formulas.

Example 1: Basic Filtering

Data:

AB
110
220
330

Formula:

excel
Copy
=FILTER(A1:B3, B1:B3 > 15)

Result:

AB
220
330

Example 2: Filtering with Multiple Criteria

Data:

AB
110
220
330

Formula:

excel
Copy
=FILTER(A1:B3, (B1:B3 > 15) * (A1:A3 < 3))

Result:

AB
220

Example 3: Filtering with Text Criteria

Data:

AB
Apple10
Banana20
Cherry30

Formula:

excel
Copy
=FILTER(A1:B3, A1:A3 = "Banana")

Result:

AB
Banana20

Example 4: Filtering with OR Logic

Data:

AB
Apple10
Banana20
Cherry30

Formula:

excel
Copy
=FILTER(A1:B3, (A1:A3 = "Apple") + (A1:A3 = "Cherry"))

Result:

AB
Apple10
Cherry30

Example 5: Filtering with Dates

Data:

AB
2023-10-0110
2023-10-0220
2023-10-0330

Formula:

excel
Copy
=FILTER(A1:B3, A1:A3 > DATE(2023, 10, 1))

Result:

AB
2023-10-0220
2023-10-0330

Example 6: Filtering with Wildcards

Data:

AB
Apple10
Banana20
Apricot30

Formula:

excel
Copy
=FILTER(A1:B3, ISNUMBER(SEARCH("Ap*", A1:A3)))

Result:

AB
Apple10
Apricot30

Example 7: Filtering with Blank Cells

Data:

AB
Apple10
20
Cherry30

Formula:

excel
Copy
=FILTER(A1:B3, A1:A3 <> "")

Result:

AB
Apple10
Cherry30

Example 8: Filtering with Multiple Columns

Data:

ABC
Apple10100
Banana20200
Cherry30300

Formula:

excel
Copy
=FILTER(A1:C3, (B1:B3 > 15) * (C1:C3 < 250))

Result:

ABC
Banana20200

Example 9: Filtering with Dynamic Arrays

Data:

AB
Apple10
Banana20
Cherry30

Formula:

excel
Copy
=FILTER(A1:B3, B1:B3 > 15)

Result:

AB
Banana20
Cherry30

Example 10: Filtering with Error Handling

Data:

AB
Apple10
Banana#N/A
Cherry30

Formula:

excel
Copy
=FILTER(A1:B3, NOT(ISERROR(B1:B3)))

Result:

AB
Apple10
Cherry30

These examples demonstrate the versatility of the FILTER function in Excel, allowing you to manipulate and extract data based on various conditions and criteria.

No comments:

Post a Comment