Advanced Filter with Criteria Range in Excel (18 Applications)

Method 1 – Using the Advanced Filter Criteria Range for Number and Dates

Column B to Column E in the sample dataset represents sales data. We will use the Advanced Filter Criteria Range for filtering numbers and date, extracting all data where the sales quantity is greater than 10.

Use of Advanced Filter Criteria Range for Number and Dates

  • In the Data tab, select the Advanced command from the Sort & Filter option. A dialogue box named Advanced Filter will appear.

Use of Advanced Filter Criteria Range for Number and Dates

  • Select the entire table (B4:E14) for the List range.
  • Select cell (C17:C18) as Criteria range.
  • Press OK.

Use of Advanced Filter Criteria Range for Number and Dates

  • Here’s the result.

Note:
1. Select the criteria with two rows at least.

2. We will use headers for the related columns where filtering criteria will be applied.


Method 2 – Filter Text Values with Advanced Filter Criteria

Case 2.1 – For Exact Text Match

We have the following dataset of sales along with a new column City. We will extract only the data for the city NEW YORK

  • Select cell C18.
  • Insert the following formula:
=EXACT(D5," NEW YORK")
  • Press Enter.

For Exact match of Text

  • Select the following filter criteria range: List Range: B4:F14, Criteria Range: C17:C18.
  • Hit OK.

For Exact match of Text

  • We will get only the data for NEW YORK.


Case 2.1 – Having Specific Character at the Beginning

We will extract only the rows where the cities start with the word New.

Having Specific Character at the Beginning

  • Select the criteria ranges in the Advanced Filter box: List Range: B4:F14, Criteria Range: C18:C19.
  • Press OK.

Having Specific Character at the Beginning

  • We will get the data for all cities starting with the word New.


Method 3 – Use Wildcards with the Advanced Filter Option

Usually, there are three types of wildcard characters in Excel:

? (Question Mark) – Represents any single character in a text.

* (Asterisk) – Represents any number of characters.

~ (Tilde) – Represents the presence of a wildcard character in the text.

We’ll find the names of salespeople starting with the text J.

Use Wildcards with Advanced Filter Criteria Range

  • Open the Advanced Filter window.
  • Select the following criteria range: List Range: B4:F14, Criteria Range: C17:C18.
  • Press OK.

Use Wildcards with Advanced Filter Criteria Range

  • We will get the names of salespeople that start with text J.


Method 4 – Apply a Formula with the Advanced Filter Criteria Range

We will extract the sales amounts greater than $350.

  • Select cell C19.
  • Insert the following formula:
=F5>350
  • Hit Enter.

Apply Formula with Advanced Filter Criteria Range

  • The checks whether the sales value is higher than $350.

Apply Formula with Advanced Filter Criteria Range

  • Select the following criteria range in the Advanced Filter dialogue box: List Range: B4:F14, Criteria Range: C17:C19.
  • Press OK.

  • We can see the data only where the sales are greater than $350.

Method 5 – Advanced Filter with AND Logic Criteria

We have the following dataset. We will filter data for the city of New York and sales value >= 200.

Advanced Filter Criteria Range with AND Logic

  • Go to the Advanced Filter dialogue box and select the following criteria range: List Range: B4:F14, Criteria Range: C18:C19.
  • Press OK.

Advanced Filter Criteria Range with AND Logic

  • Here are the results.


Method 6 – Using OR Logic with Advanced Filter Criteria Range

We will fetch data for New York and Texas.

Use of OR Logic with Advanced Filter Criteria Range

  • Open the Advanced Filter dialogue box.
  • Input the following criteria range: List Range: B4:F14, Criteria Range: C18:C20.
  • Hit OK.

Use of OR Logic with Advanced Filter Criteria Range

  • We’ll get the filtered dataset for New York and Texas.


Method 7 – Combination of AND and OR Logic as Criteria Range

We will extract data from the following dataset based on multiple criteria, which are in the smaller table below.

Combination of AND & OR Logic in Advanced Filter Criteria Range

  • Open the Advanced Filter dialogue box.
  • Select the following criteria: List Range: B4:F14, Criteria Range: C18:C20.
  • Then press OK.

Combination of AND & OR Logic in Advanced Filter Criteria Range


Method 8 – Using the Advanced Filter Criteria Range to Extract Specific Columns

After filtering, we will move the filtered part into another column.

Using Advanced Filter Criteria Range to Extract Specific Columns

  • From the Advanced Filter dialogue box, select the following criteria: List Range: B4:F14, Criteria Range: C18:C20.
  • Select copy to another location option.
  • In Copy to range, put H8:I10.
  • Hit OK.

Using Advanced Filter Criteria Range to Extract Specific Columns

  • We get the filtered data in H8:I10 according to our criteria.


Method 9 – Copy Data to Another Worksheet after Filtering

  • Go to the Another Worksheet-2 sheet where we will copy data after filtering.

Copy Data to Another Worksheet after Filtering

  • We can see two columns, City and Sales, in Another Worksheet-2.

Copy Data to Another Worksheet after Filtering

  • Open the Advanced Filter dialogue box.

Copy Data to Another Worksheet after Filtering

  • Go to Another Worksheet-1.
  • Select the following criteria: List Range: B4:F14, Criteria Range: C18:C19.
  • Select the copy to another location option.

Copy Data to Another Worksheet after Filtering

  • Go to Another Worksheet-2.
  • For Copy to range, put B2:C4.
  • Press OK.

  • We can see the filtered data in Another Worksheet-2.


Method 10 – Extract Unique Records with Advanced Filter Criteria

We will extract unique values of cities in another column.

Extract Unique Records with Advanced Filter Criteria

  • Open the Advanced Filter window. Select the criteria List range: D4:D14.
  • Select the option Copy to another location.
  • Input the Copy to range as H4:H8.
  • Check the box Unique records only.
  • Press OK.

Extract Unique Records with Advanced Filter Criteria

  • Here are the results.


Method 11 – Find Weekdays with the Advanced Filter Criteria Range

  • Select cell C19.
  • Insert the following formula:
=AND(WEEKDAY(B5)<>1,WEEKDAY(B5)<>7)

Find Weekdays with Advanced Filter Criteria Range

  • Set the following criteria range in the Advanced Filter dialogue box: List Range: B4:F14, Criteria Range: C18:C19.
  • Press OK.

Find Weekdays with Advanced Filter Criteria Range

  • We will get the Date values only for weekdays.

How Does the Formula Work?

  • WEEKDAY(B5)<>1: 1 denotes Sunday. This part sets the criteria that the date is not Sunday.
  • WEEKDAY(B5)<>7: 7 denotes Sunday. This part sets the criteria that the date is not Saturday.
  • AND(WEEKDAY(B5)<>1,WEEKDAY(B5)<>7): Sets the criteria that the day is neither Saturday nor Sunday.

Method 12 – Apply Advanced Filter to Find the Weekend

  • Select cell C19.
  • Insert the following formula:
=OR(WEEKDAY(B5)=1,WEEKDAY(B5)=7)
  • Press Enter.

Apply Advanced Filter Criteria Range to Find Weekend

  • From the Advanced Filter dialog box, select the following criteria range: List Range: B4:F14, Criteria Range: C18:C19.
  • Press OK.

Apply Advanced Filter Criteria Range to Find Weekend

  • We can see only the values of the weekend in the Date column.


Method 13 – Use the Advanced Filter to Calculate Values Below or Above Average

We will only filter the sales value which is greater than the average sales value.

  • Select cell C19.
  • Insert the following formula:
=E5>AVERAGE(E5:E14)

Use Advanced Filter Criteria Range to Calculate Values Below or Above Average

  • Open the Advanced Filter dialogue box. Input the following criteria range: List Range: B4:F14, Criteria Range: C18:C19.
  • Press OK.

Use Advanced Filter Criteria Range to Calculate Values Below or Above Average

  • We get only the dataset for sales value greater than the average value.


Method 14 – Filtering Blank Cells with OR Logic

  • We have set the criteria by using the following formula type:
=B5=""
  • We repeated this formula for each column (B through F) and put it in the range C18:C22.

Filtering Blank Cells with OR Logic

  • Go to the Advanced Filter dialogue box.
  • Input the following criteria: List Range: B4:F14, Criteria Range: C17:C22.
  • Press OK.

Filtering Blank Cells with OR Logic

  • We get the dataset that only consists of rows with some blank cells.


Method 15 – Apply the Advanced Filter to Filter Non-Blank Cells using OR as well as AND Logic

We will show only rows without any blank cells.

  • We have set the following criteria for using the formula:
=B5<>""
  • We repeated this for each column.

Apply Advanced Filter Criteria Range to Filter Non-Blank Cells using OR as well as AND Logic

  • Go to the Advanced Filter dialogue box.
  • Insert the following criteria range: List Range: B4:F14, Criteria Range: C17:G18
  • Press OK.

Apply Advanced Filter Criteria Range to Filter Non-Blank Cells using OR as well as AND Logic

  • We get the filtered dataset.


Method 16 – Find Top 5 Records Using the Advanced Filter Criteria Range

We will take the first five values of the Sales column.

  • Use the following criteria formula:
=F5>=LARGE($F$5:$F$14,5)

Find First 5 Records Using Advanced Filter Criteria Range

  • Go to the Advanced Filter dialogue box.
  • Insert the following criteria range: List Range: B4:F14, Criteria Range: C17:C18.
  • Hit OK.

Find First 5 Records Using Advanced Filter Criteria Range

  • We get the top five records of the Sales column.


Method 17 – Use the Advanced Filter Criteria Range to Find the Bottom Five Records

  • To find the bottom five records for the Sales column, we will use the following formula:
=F5<=SMALL($F$5:$F$14,5)

Use Advanced Filter Criteria Range to Find Bottom Five Records

  • Insert the following criteria range in the Advanced Filter dialogue box: List Range: B4:F14, Criteria Range: C17:C18.
  • Press OK.

Use Advanced Filter Criteria Range to Find Bottom Five Records

  • We can see the bottom five values of the Sales column.


Method 18 – Filter Rows According to a List’s Matching Entries Using the Advanced Filter Criteria Range

Case 18.1 – Matches with Items in a List

We will take only the matching entries between the city columns.

  • Here’s the criteria formula:
=C5=E5

Matches with Items in a List

  • Open the Advanced Filter option.
  • Insert the following criteria range: List Range: B4:F14, Criteria Range: C17:C18.
  • Hit OK.

Matches with Items in a List

  • We can see the rows that have the same value in the city columns.


Case 18.2 – Distinct Items

  • We will set the criteria by using the following formula:
=C5<>E5

Do Not Matches with Items in a List

  • From the Advanced Filter, insert the following criteria range: List Range: B4:F14, Criteria Range: C17:C18.
  • Press OK.

Do Not Matches with Items in a List

  • We will get filtered rows where the values of cities in Column C and Column E do not match with one another.


Download the Practice Workbook


<< Go Back to Advanced Filter | Filter in Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mukesh Dipto
Mukesh Dipto

Mukesh Dipto is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, HTML, CSS, JavaScript, and WordPress. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he... Read Full Bio

2 Comments
  1. This post on advanced filters with criteria ranges is incredibly insightful! The 18 applications provide practical examples that I can’t wait to implement in my own projects. The clear explanations and step-by-step guidance make it easy to understand, even for complex tasks. Thank you for sharing such valuable tips!

    • Hello,

      You are most welcome. Thanks for your appreciation. Glad to hear that you found the examples clear and insightful. Keep exploring Excel with ExcelDemy!

      Regards
      ExcelDemy

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo