1<?xml version="1.0" encoding="UTF-8"?>
2
3
4
5<!--***********************************************************
6 *
7 * Licensed to the Apache Software Foundation (ASF) under one
8 * or more contributor license agreements.  See the NOTICE file
9 * distributed with this work for additional information
10 * regarding copyright ownership.  The ASF licenses this file
11 * to you under the Apache License, Version 2.0 (the
12 * "License"); you may not use this file except in compliance
13 * with the License.  You may obtain a copy of the License at
14 *
15 *   http://www.apache.org/licenses/LICENSE-2.0
16 *
17 * Unless required by applicable law or agreed to in writing,
18 * software distributed under the License is distributed on an
19 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
20 * KIND, either express or implied.  See the License for the
21 * specific language governing permissions and limitations
22 * under the License.
23 *
24 ***********************************************************-->
25
26
27
28
29		<helpdocument version="1.0">
30<meta>
31<topic id="textscalcguidespecialfilterxml" indexer="include" status="PUBLISH">
32<title xml-lang="en-US" id="tit">Filter: Applying Advanced Filters</title>
33<filename>/text/scalc/guide/specialfilter.xhp</filename>
34</topic>
35</meta>
36<body>
37
38
39
40<bookmark xml-lang="en-US" branch="index" id="bm_id3148798"><bookmark_value>filters;defining advanced filters </bookmark_value>
41<bookmark_value>advanced filters</bookmark_value>
42<bookmark_value>defining; advanced filters</bookmark_value>
43<bookmark_value>database ranges; advanced filters</bookmark_value>
44</bookmark>
45  <comment>MW made "applying;advanced filters" a one level entry</comment>
46  <paragraph xml-lang="en-US" id="hd_id3148798" role="heading" level="1" l10n="U" oldref="18"><variable id="specialfilter"><link href="text/scalc/guide/specialfilter.xhp" name="Filter: Applying Advanced Filters">Filter: Applying Advanced Filters</link>
47</variable></paragraph>
48  <list type="ordered">
49   <listitem>
50    <paragraph xml-lang="en-US" id="par_id3145785" role="listitem" l10n="U" oldref="19">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.</paragraph>
51   </listitem>
52   <listitem>
53    <paragraph xml-lang="en-US" id="par_id3153142" role="listitem" l10n="U" oldref="20">Once you have created a filter matrix, select the sheet ranges to be filtered. Open the <emph>Advanced Filter</emph> dialog by choosing <emph>Data - Filter - Advanced Filter</emph>, and define the filter conditions.</paragraph>
54   </listitem>
55   <listitem>
56    <paragraph xml-lang="en-US" id="par_id3153726" role="listitem" l10n="U" oldref="21">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 <emph>Format - Row - Show </emph>command.</paragraph>
57   </listitem>
58  </list>
59  <paragraph xml-lang="en-US" id="par_id3149664" role="paragraph" l10n="U" oldref="22"> <emph>Example</emph> </paragraph>
60  <paragraph xml-lang="en-US" id="par_id3147427" role="paragraph" l10n="U" oldref="23">Load a spreadsheet with a large number of records. We are using a fictional <emph>Turnover</emph> document, but you can just as easily use any other document. The document has the following layout:</paragraph>
61  <table id="tbl_id3149377">
62
63
64   <tablerow>
65    <tablecell>
66
67    </tablecell>
68    <tablecell>
69     <paragraph xml-lang="en-US" id="par_id3154510" role="paragraph" l10n="U" oldref="24"> <emph>A</emph> </paragraph>
70    </tablecell>
71    <tablecell>
72     <paragraph xml-lang="en-US" id="par_id3150327" role="paragraph" l10n="U" oldref="25"> <emph>B</emph> </paragraph>
73    </tablecell>
74    <tablecell>
75     <paragraph xml-lang="en-US" id="par_id3154756" role="paragraph" l10n="U" oldref="26"> <emph>C</emph> </paragraph>
76    </tablecell>
77    <tablecell>
78     <paragraph xml-lang="en-US" id="par_id3155335" role="paragraph" l10n="U" oldref="27"> <emph>D</emph> </paragraph>
79    </tablecell>
80    <tablecell>
81     <paragraph xml-lang="en-US" id="par_id3146315" role="paragraph" l10n="U" oldref="28"> <emph>E</emph> </paragraph>
82    </tablecell>
83   </tablerow>
84   <tablerow>
85    <tablecell>
86     <paragraph xml-lang="en-US" id="par_id3145790" role="paragraph" l10n="U" oldref="29"> <emph>1</emph> </paragraph>
87    </tablecell>
88    <tablecell>
89     <paragraph xml-lang="en-US" id="par_id3159239" role="paragraph" l10n="U" oldref="30">Month</paragraph>
90    </tablecell>
91    <tablecell>
92     <paragraph xml-lang="en-US" id="par_id3150086" role="paragraph" l10n="U" oldref="31">Standard</paragraph>
93    </tablecell>
94    <tablecell>
95     <paragraph xml-lang="en-US" id="par_id3150202" role="paragraph" l10n="U" oldref="32">Business</paragraph>
96    </tablecell>
97    <tablecell>
98     <paragraph xml-lang="en-US" id="par_id3150883" role="paragraph" l10n="U" oldref="33">Luxury</paragraph>
99    </tablecell>
100    <tablecell>
101     <paragraph xml-lang="en-US" id="par_id3152987" role="paragraph" l10n="U" oldref="34">Suite</paragraph>
102    </tablecell>
103   </tablerow>
104   <tablerow>
105    <tablecell>
106     <paragraph xml-lang="en-US" id="par_id3154486" role="paragraph" l10n="U" oldref="35"> <emph>2</emph> </paragraph>
107    </tablecell>
108    <tablecell>
109     <paragraph xml-lang="en-US" id="par_id3148839" role="paragraph" l10n="U" oldref="36">January</paragraph>
110    </tablecell>
111    <tablecell>
112     <paragraph xml-lang="en-US" id="par_id3153816" role="paragraph" l10n="U" oldref="37">125600</paragraph>
113    </tablecell>
114    <tablecell>
115     <paragraph xml-lang="en-US" id="par_id3157978" role="paragraph" l10n="U" oldref="38">200500</paragraph>
116    </tablecell>
117    <tablecell>
118     <paragraph xml-lang="en-US" id="par_id3155268" role="paragraph" l10n="U" oldref="39">240000</paragraph>
119    </tablecell>
120    <tablecell>
121     <paragraph xml-lang="en-US" id="par_id3153286" role="paragraph" l10n="U" oldref="40">170000</paragraph>
122    </tablecell>
123   </tablerow>
124   <tablerow>
125    <tablecell>
126     <paragraph xml-lang="en-US" id="par_id3146782" role="paragraph" l10n="U" oldref="41"> <emph>3</emph> </paragraph>
127    </tablecell>
128    <tablecell>
129     <paragraph xml-lang="en-US" id="par_id3149900" role="paragraph" l10n="U" oldref="42">February</paragraph>
130    </tablecell>
131    <tablecell>
132     <paragraph xml-lang="en-US" id="par_id3154763" role="paragraph" l10n="U" oldref="43">160000</paragraph>
133    </tablecell>
134    <tablecell>
135     <paragraph xml-lang="en-US" id="par_id3150050" role="paragraph" l10n="U" oldref="44">180300</paragraph>
136    </tablecell>
137    <tablecell>
138     <paragraph xml-lang="en-US" id="par_id3153801" role="paragraph" l10n="U" oldref="45">362000</paragraph>
139    </tablecell>
140    <tablecell>
141     <paragraph xml-lang="en-US" id="par_id3154708" role="paragraph" l10n="U" oldref="46">220000</paragraph>
142    </tablecell>
143   </tablerow>
144   <tablerow>
145    <tablecell>
146     <paragraph xml-lang="en-US" id="par_id3151191" role="paragraph" l10n="U" oldref="47"> <emph>4</emph> </paragraph>
147    </tablecell>
148    <tablecell>
149     <paragraph xml-lang="en-US" id="par_id3147250" role="paragraph" l10n="U" oldref="48">March</paragraph>
150    </tablecell>
151    <tablecell>
152     <paragraph xml-lang="en-US" id="par_id3153334" role="paragraph" l10n="U" oldref="49">170000</paragraph>
153    </tablecell>
154    <tablecell>
155
156    </tablecell>
157    <tablecell>
158
159    </tablecell>
160    <tablecell>
161     <paragraph xml-lang="en-US" id="par_id3151391" role="paragraph" l10n="U" oldref="50">and so on...</paragraph>
162    </tablecell>
163   </tablerow>
164  </table>
165  <paragraph xml-lang="en-US" id="par_id3147300" role="paragraph" l10n="U" oldref="51">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.</paragraph>
166  <table id="tbl_id3166462">
167
168
169   <tablerow>
170    <tablecell>
171
172    </tablecell>
173    <tablecell>
174     <paragraph xml-lang="en-US" id="par_id3159115" role="paragraph" l10n="U" oldref="52"> <emph>A</emph> </paragraph>
175    </tablecell>
176    <tablecell>
177     <paragraph xml-lang="en-US" id="par_id3146886" role="paragraph" l10n="U" oldref="53"> <emph>B</emph> </paragraph>
178    </tablecell>
179    <tablecell>
180     <paragraph xml-lang="en-US" id="par_id3153124" role="paragraph" l10n="U" oldref="54"> <emph>C</emph> </paragraph>
181    </tablecell>
182    <tablecell>
183     <paragraph xml-lang="en-US" id="par_id3152979" role="paragraph" l10n="U" oldref="55"> <emph>D</emph> </paragraph>
184    </tablecell>
185    <tablecell>
186     <paragraph xml-lang="en-US" id="par_id3145827" role="paragraph" l10n="U" oldref="56"> <emph>E</emph> </paragraph>
187    </tablecell>
188   </tablerow>
189   <tablerow>
190    <tablecell>
191     <paragraph xml-lang="en-US" id="par_id3149892" role="paragraph" l10n="U" oldref="57"> <emph>20</emph> </paragraph>
192    </tablecell>
193    <tablecell>
194     <paragraph xml-lang="en-US" id="par_id3150693" role="paragraph" l10n="U" oldref="58">Month</paragraph>
195    </tablecell>
196    <tablecell>
197     <paragraph xml-lang="en-US" id="par_id3147475" role="paragraph" l10n="U" oldref="59">Standard</paragraph>
198    </tablecell>
199    <tablecell>
200     <paragraph xml-lang="en-US" id="par_id3154846" role="paragraph" l10n="U" oldref="60">Business</paragraph>
201    </tablecell>
202    <tablecell>
203     <paragraph xml-lang="en-US" id="par_id3153082" role="paragraph" l10n="U" oldref="61">Luxury</paragraph>
204    </tablecell>
205    <tablecell>
206     <paragraph xml-lang="en-US" id="par_id3149506" role="paragraph" l10n="U" oldref="62">Suite</paragraph>
207    </tablecell>
208   </tablerow>
209   <tablerow>
210    <tablecell>
211     <paragraph xml-lang="en-US" id="par_id3149188" role="paragraph" l10n="U" oldref="63"> <emph>21</emph> </paragraph>
212    </tablecell>
213    <tablecell>
214     <paragraph xml-lang="en-US" id="par_id3149956" role="paragraph" l10n="CHG" oldref="64">January</paragraph>
215    </tablecell>
216    <tablecell>
217
218    </tablecell>
219    <tablecell>
220
221    </tablecell>
222    <tablecell>
223
224    </tablecell>
225    <tablecell>
226
227    </tablecell>
228   </tablerow>
229   <tablerow>
230    <tablecell>
231     <paragraph xml-lang="en-US" id="par_id3150865" role="paragraph" l10n="U" oldref="65"> <emph>22</emph> </paragraph>
232    </tablecell>
233    <tablecell>
234
235    </tablecell>
236    <tablecell>
237     <paragraph xml-lang="en-US" id="par_id3155957" role="paragraph" l10n="U" oldref="66">&lt;160000</paragraph>
238    </tablecell>
239    <tablecell>
240
241    </tablecell>
242    <tablecell>
243
244    </tablecell>
245    <tablecell>
246
247    </tablecell>
248   </tablerow>
249  </table>
250  <paragraph xml-lang="en-US" id="par_id3153566" role="paragraph" l10n="CHG" oldref="67">Specify that only rows which either have the value <item type="literal">January</item> in the <emph>Month</emph> cells OR a value of under 160000 in the <emph>Standard</emph><comment>standard not default, look at U59!!!</comment> cells will be displayed.</paragraph>
251  <paragraph xml-lang="en-US" id="par_id3147372" role="paragraph" l10n="U" oldref="68">Choose <emph>Data - Filter - Advanced Filter</emph>, 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.</paragraph>
252  <section id="relatedtopics">
253
254   <embed href="text/scalc/guide/filters.xhp#filters"/>
255   <embed href="text/scalc/guide/autofilter.xhp#autofilter"/>
256   <embed href="text/scalc/guide/cellcopy.xhp#cellcopy"/>
257
258  </section>
259 </body>
260</helpdocument>
261