Excel根据不同列进行OR条件过滤

本文介绍如何在Excel中使用高级筛选功能,实现多条件跨列筛选,其中任一条件满足即可通过筛选。具体步骤包括设置筛选范围、输入筛选条件、选择操作方式等。

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.

The example may be easier to understand if you copy it to a blank worksheet.

How to copy an example

  1. Create a blank workbook or worksheet.
  2. Select the example in the Help topic.

 Note   Do not select the row or column headers.

 

Selecting an example from Help

  1. Press CTRL+C.
  2. In the worksheet, select cell A1, and press CTRL+V.
  3. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.

 

1

2

3

4

5

6

7

8

9

10

A

B

C

Type

Salesperson

Sales

 

 

 

 

 

 

 

 

 

 

 

 

Type

Salesperson

Sales

Beverages

Suyama

$5122

Meat

Davolio

$450

produce

Buchanan

$6328

Produce

Davolio

$6544

  1. 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. In the example, you would enter:

 

A

B

C

1

Type

Salesperson

Sales

2

="=Produce"

 

 

3

 

="=Buchanan"

 

  1. Click a cell in the list range. In the example, you would click any cell in the list range, A6:C10.
  2. On the Data tab, in the Sort & Filter group, click Advanced.

 

  1. Do one of the following:
  • To filter the list range by hiding rows that don't match your criteria, click Filter the list, in-place.
  • To filter the list range by copying rows that match your criteria to another area of the worksheet, click Copy to another location, click in the Copy to box, and then click the upper-left corner of the area where you want to paste the rows.

 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.

  1. In the Criteria range box, enter the reference for the criteria range, including the criteria labels. In the example, you would 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 .

  1. In the example, the filtered result for the list range would be:

 

A

B

C

6

Type

Salesperson

Sales

9

produce

Buchanan

$6,328

10

Produce

Davolio

$6,544

转载于:https://www.cnblogs.com/yanluckly/archive/2010/12/14/1905295.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值