excel自动筛选
In Excel 2003, you can add a couple of buttons to the toolbar to make it easy to filter a table. For example, in the table below, the East region is selected. With one click of a button, and no programming, you can add an AutoFilter and filter the table to show only the East region orders. Thanks to Roger Govier for sharing this tip.
在Excel 2003中,可以向工具栏添加几个按钮,以使其易于过滤表格。 例如,在下表中,选择了东部地区。 只需单击一下按钮,无需编程,就可以添加“自动筛选”并筛选表格以仅显示东部地区订单。 感谢Roger Govier分享了这一技巧。
[Update: For Excel 2007 instructions, see Easy Filtering in Excel 2007]
[更新:有关Excel 2007的说明,请参阅在Excel 2007中轻松过滤 ]
将按钮添加到工具栏 (Add Buttons to the Toolbar)
You can add two buttons to the toolbar, to make filtering easy. One button will filter the table for the selected item, and the other button will show all the records.
您可以在工具栏上添加两个按钮,以简化过滤。 一个按钮将过滤所选项目的表格,另一个按钮将显示所有记录。
To add the buttons:
要添加按钮:
- On the menu bar, click Tools, then click Customize. 在菜单栏上,单击“工具”,然后单击“自定义”。
- In the Customize dialog box, click the Commands tab. 在“自定义”对话框中,单击“命令”选项卡。
- Click the Data category, then drag the AutoFilter command to an existing toolbar. 单击“数据”类别,然后将“自动筛选”命令拖到现有的工具栏上。
- Drag the Show All command to an existing toolbar. 将全部显示命令拖到现有的工具栏上。
- Close the Customize dialog box. 关闭自定义对话框。
应用自动筛选 (Apply the AutoFilter)
Now you can use the new buttons to filter the table, or to show all the records. The table doesn't need to have an AutoFilter currently applied.
现在,您可以使用新按钮来过滤表或显示所有记录。 该表不需要当前已应用自动筛选。
- In a table in Excel, select a cell that contains the criterion you'd like to use. For example, to filter for the East region records, select an East cell in the Region column. 在Excel的表格中,选择一个包含您要使用的条件的单元格。 例如,要过滤东部区域记录,请在“区域”列中选择一个东部单元格。
- On the toolbar, click the AutoFilter button 在工具栏上,单击“自动筛选”按钮
The table is filtered, and shows only the East region records.
该表将被过滤,并仅显示东部地区记录。
取下过滤器 (Remove the Filter)
To remove the filter, and show all the records again:
要删除过滤器,然后再次显示所有记录:
- Select any cell on the worksheet 选择工作表上的任何单元格
- On the toolbar, click the Show All button. 在工具栏上,单击“全部显示”按钮。
The filter is removed, but the AutoFilter feature is still turned on, and all the records are visible. For more information on Excel AutoFilters, visit the pages on Excel AutoFilter Basics and Excel AutoFilter Tips on my website.
筛选器已删除,但“自动筛选”功能仍处于打开状态,所有记录均可见。 有关Excel自动筛选的更多信息,请访问我网站上的Excel自动筛选基础知识和Excel自动筛选技巧中的页面。
观看视频 (Watch the Video)
To see the steps, watch the short video below.
要查看步骤,请观看下面的简短视频。
翻译自: https://contexturesblog.com/archives/2009/03/16/autofilter-by-selection-in-excel/
excel自动筛选