Text Documents (Writer)
HTML Documents (Writer Web)
Spreadsheets (Calc)
Presentations (Impress)
Drawings (Draw)
Database Functionality (Base)
Formulae (Math)
Charts and Diagrams
Macros and Scripting
Office Installation
Common Help Topics
OneOffice Logo

Advanced Filter

Defines an advanced filter.

To access this command...

Choose Data - More Filters - Advanced Filter... .

Read filter criteria from

Select the named range, or enter the cell range that contains the filter criteria that you want to use.

Shrink / Expand

Click the Shrink icon to reduce the dialog to the size of the input field. It is then easier to mark the required reference in the sheet. The icons then automatically convert to the Expand icon. Click it to restore the dialog to its original size.

The dialogue box is automatically minimised when you click within a sheet with the mouse. As soon as you release the mouse button, the dialogue box is restored and the reference range defined with the mouse is highlighted in the document by a blue frame.

Shrink

Expand

Options

Shows additional filter options.

Case-sensitive

Distinguishes between upper-case and lower-case letters when filtering the data.

Range contains column labels

Includes the column labels in the first row of a cell range.

Copy results to

Mark the check box, and then select the cell range in which you want to display the filter results. You can also select a named range from the list.

Regular expression

Allows you to use regular expressions in the filter definition. For a list of the regular expressions that Office supports, click here.

If the Regular Expressions check box is marked, you can use regular expressions in the Value field if the Condition list box is set to '=' EQUAL or '<>' UNEQUAL. This also applies to the respective cells that you reference for an advanced filter.

No duplication

Excludes duplicate rows from the list of filtered data.

Keep filter criteria

Mark the Copy results to check box, and then specify the destination range in which you want to display the filtered data. If this check box is marked, the destination range remains linked to the source range. You must have defined the source range under Data - Define range as a database range. Following this, you can reapply the defined filter at any time as follows: click within the source range, then choose Data - Refresh Range.

Applying Advanced Filters

  1. Copy the column headers of the sheet ranges to be filtered into an empty area of the sheet, and then enter the criteria for the filter in a row beneath the headers. Horizontally arranged data in a row will always be logically connected with AND, and vertically arranged data in a column will always be logically connected with OR.

  2. Once you have created a filter matrix, select the sheet ranges to be filtered. Open the Advanced Filter dialog by choosing Data - More Filters - Advanced Filter, and define the filter conditions.

  3. Then click OK, and you will see that only the rows from the original sheet whose contents have met the search criteria are still visible. All other rows are temporarily hidden and can be made to reappear with the Format - Rows - Show command.

Example

Load a spreadsheet with a large number of records. We are using a fictional Turnover document, but you can just as easily use any other document. The document has the following layout:

A B C D E
1 Month Standard Business Luxury Suite
2 January 125600 200500 240000 170000
3 February 160000 180300 362000 220000
4 March 170000 and so on...

Copy row 1 with the row headers (field names), to row 20, for example. Enter the filter conditions linked with OR in rows 21, 22, and so on.

A B C D E
20 Month Standard Business Luxury Suite
21 January
22 <160000

Specify that only rows which either have the value January in the Month cells OR a value of under 160000 in the Standard cells will be displayed.

Choose Data - More Filters - Advanced Filter, and then select the range A20:E22. After you click OK, only the filtered rows will be displayed. The other rows will be hidden from view.