='=entry'

Where entry is the text or value you want to find. For example:

What you type in the cell
What Excel evaluates and displays
='=Davolio'
=Davolio
='=3000'
=3000

Considering case-sensitivity

When filtering text data, Excel doesn't distinguish between uppercase and lowercase characters. However, you can use a formula to perform a case-sensitive search. For an example, see the section Wildcard criteria.

Using pre-defined names

You can name a range Criteria, and the reference for the range will appear automatically in the Criteria range box. You can also define the name Database for the list range to be filtered and define the name Extract for the area where you want to paste the rows, and these ranges will appear automatically in the List range and Copy to boxes, respectively.

Creating criteria by using a formula

You can use a calculated value that is the result of a formula as your criterion. Remember the following important points:

Multiple criteria, one column, any criteria true

Boolean logic: (Salesperson = 'Davolio' OR Salesperson = 'Buchanan')

  1. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  2. To find rows that meet multiple criteria for one column, type the criteria directly below each other in separate rows of the criteria range. Using the example, enter:
    Type
    Salesperson
    Sales
    ='=Davolio'
    ='=Buchanan'
  3. Click a cell in the list range. Using the example, click any cell in the range A6:C10.
  4. On the Data tab, in the Sort & Filter group, click Advanced.
  5. Do one of the following:
  6. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$C$3.
    To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  7. Using the example, the filtered result for the list range is:
    Type
    Salesperson
    Sales
    Meat
    Davolio
    $450
    produce
    Buchanan
    $6,328
    Produce
    Davolio
    $6,544

Multiple criteria, multiple columns, all criteria true

Boolean logic: (Type = 'Produce' AND Sales > 1000)

  1. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  2. To find rows that meet multiple criteria in multiple columns, type all the criteria in the same row of the criteria range. Using the example, enter:
    Type
    Salesperson
    Sales
    ='=Produce'
    >1000
  3. Click a cell in the list range. Using the example, click any cell in the range A6:C10.
  4. On the Data tab, in the Sort & Filter group, click Advanced.
  5. Do one of the following:
  6. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$C$2.
    To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  7. Using the example, the filtered result for the list range is:
    Type
    Salesperson
    Sales
    produce
    Buchanan
    $6,328
    Produce
    Davolio
    $6,544

Multiple criteria, multiple columns, any criteria true

Boolean logic: (Type = 'Produce' OR Salesperson = 'Buchanan')

  1. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  2. To find rows that meet multiple criteria in multiple columns where any criteria can be true, type the criteria in the different columns and rows of the criteria range. Using the example, enter:
    Type
    Salesperson
    Sales
    ='=Produce'
    ='=Buchanan'
  3. Click a cell in the list range. Using the example, click any cell in the list range A6:C10.
  4. On the Data tab, in the Sort & Filter group, click Advanced.
  5. Do one of the following:
    Tip: When you copy filtered rows to another location, you can specify which columns to include in the copy operation. Before filtering, copy the column labels for the columns that you want to the first row of the area where you plan to paste the filtered rows. When you filter, enter a reference to the copied column labels in the Copy to box. The copied rows will then include only the columns for which you copied the labels.
  6. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$B$3.
    To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  7. Using the example, the filtered result for the list range is:
    Type
    Salesperson
    Sales
    produce
    Buchanan
    $6,328
    Produce
    Davolio
    $6,544

Multiple sets of criteria, one column in all sets

Boolean logic: ( (Sales > 6000 AND Sales < 6500 ) OR (Sales < 500) )

  1. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  2. To find rows that meet multiple sets of criteria where each set includes criteria for one column, include multiple columns with the same column heading. Using the example, enter:
    Type
    Salesperson
    Sales
    Sales
    >6000
    <6500
    <500
  3. Click a cell in the list range. Using the example, click any cell in the list range A6:C10.
  4. On the Data tab, in the Sort & Filter group, click Advanced.
  5. Do one of the following:
  6. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$D$3.
    To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  7. Using the example, the filtered result for the list range is:
    Type
    Salesperson
    Sales
    Meat
    Davolio
    $450
    produce
    Buchanan
    $6,328
Excel Mds Table

Multiple sets of criteria, multiple columns in each set

Boolean logic: ( (Salesperson = 'Davolio' AND Sales >3000) OR (Salesperson = 'Buchanan' AND Sales > 1500) )

  1. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  2. To find rows that meet multiple sets of criteria, where each set includes criteria for multiple columns, type each set of criteria in separate columns and rows. Using the example, enter:
    Type
    Salesperson
    Sales
    ='=Davolio'
    >3000
    ='=Buchanan'
    >1500
  3. Click a cell in the list range. Using the example, click any cell in the list range A6:C10.
  4. On the Data tab, in the Sort & Filter group, click Advanced.
  5. Do one of the following:
  6. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$C$3.To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  7. Using the example, the filtered result for the list range would be:
    Type
    Salesperson
    Sales
    produce
    Buchanan
    $6,328
    Produce
    Davolio
    $6,544

Wildcard criteria

Boolean logic: Salesperson = a name with 'u' as the second letter

  1. To find text values that share some characters but not others, do one or more of the following:
  2. Insert at least three blank rows above the list range that can be used as a criteria range. The criteria range must have column labels. Make sure that there is at least one blank row between the criteria values and the list range.
  3. In the rows below the column labels, type the criteria that you want to match. Using the example, enter:
    Type
    Salesperson
    Sales
    ='=Me*'
    ='=?u*'
  4. Click a cell in the list range. Using the example, click any cell in the list range A6:C10.
  5. On the Data tab, in the Sort & Filter group, click Advanced.
  6. Do one of the following:
  7. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. Using the example, enter $A$1:$B$3.
    To move the Advanced Filter dialog box out of the way temporarily while you select the criteria range, click Collapse Dialog .
  8. Using the example, the filtered result for the list range is:
    Type
    Salesperson
    Sales
    Beverages
    Suyama
    $5,122
    Meat
    Davolio
    $450
    produce
    Buchanan
    $6,328

Need more help?

You can always ask an expert in the Excel Tech Community, get support in the Answers community, or suggest a new feature or improvement on Excel User Voice.