<sect1 id="sect-data-filter">
    <title>Filtering Data</title>

    <para>
      With data filters you can select a subset of rows in the
      worksheet that meet the given criteria.  You can, for example,
      copy rows of a table containing sales of departments whose
      profit has been exceptionally high into a new sheet simply using
      a filter.
    </para>

    <sect2 id="sect-data-filter-auto">
      <title>Auto Filters</title>

      <para>
        This section has not yet been written.
      </para>
      <itemizedlist>
	<listitem>
	  <para>
	    <keycombo>
	      <keycap>Alt</keycap>
	      <keycap>Down</keycap>
	    </keycombo>
	    Open the AutoFilter in the current cell.
	  </para>
	</listitem>
	<listitem>
	  <para>
	    <keycap>Down</keycap>
	    and
	    <keycap>Up</keycap>
	    Changes the selected item in an AutoFilter
	  </para>
	</listitem>
	<listitem>
	  <para>
	    <keycap>Home</keycap>
	    Select the first item [All] in an AutoFilter
	  </para>
	</listitem>
	<listitem>
	  <para>
	    <keycap>End</keycap>
	    Select the last item in an AutoFilter
	  </para>
	</listitem>
	<listitem>
	  <para>
	    <keycap>Enter</keycap>
	    or
	    <keycombo>
	      <keycap>Alt</keycap>
	      <keycap>Up</keycap>
	    </keycombo>
	    Apply the current entry in an AutoFilter list, and close the combo-box.
	  </para>
	</listitem>
      </itemizedlist>
    </sect2>

    <sect2 id="sect-data-filter-advanced">
      <title>Advanced Filter</title>

      <para>
        To use advanced filter, you should have a few blank rows
        available in your worksheet to be used as a criteria range.
        These rows should not overlap with the rows in the table to be
        filtered.
      </para>

     <para>Now copy all the column labels from the table you want to
     filter into the first blank row in the criteria range.  Below the
     criteria labels, you can now type the conditions you want to
     match for the particular label.  For example, under a label
     `Profit' you could type `>=1000'.  The tool selects only rows
     that match all the criteria.</para>

     <figure id="fig-advanced-filter-1">
       <title>Worksheet containing the table to be filtered and a
       simple criteria</title>
       <screenshot>
         <mediaobject>
            <imageobject>
              <imagedata fileref="figures/advanced-filter-1.png" format="PNG" />
            </imageobject>
            <textobject>
              <phrase>An image of a worksheet and the advanced filter dialog.
              </phrase>
            </textobject>
           </mediaobject>
       </screenshot>
     </figure>

     <para>It is possible to have many conditions for a single label.
     For example, you can select the departments whose profit is
     either very high or very low.  To do this, type, for example,
     <![CDATA[ `<=0' below the `>=40000' ]]> condition.</para>

     <figure id="fig-advanced-filter-2">
       <title>Criteria for selecting rows whose `Profit' column is between
       0 and 40000.</title>
       <screenshot>
         <mediaobject>
            <imageobject>
              <imagedata fileref="figures/advanced-filter-2.png" format="PNG"/>
            </imageobject>
            <textobject>
              <phrase>An image of a worksheet with the filter criteria.</phrase>
            </textobject>
           </mediaobject>
       </screenshot>
     </figure>

     <para>To start the tool, select ``Advanced Filter'' from the
     ``Data'' menu.  It brings you the advanced filter dialog.  In the
     dialog, select the action you want to take.</para>

     <figure id="fig-advanced-filter-dialog">
       <title>The Advanced Filter dialog.</title>
       <screenshot>
         <mediaobject>
            <imageobject>
              <imagedata fileref="figures/dialog-filter.png" format="PNG" />
            </imageobject>
            <textobject>
              <phrase>An image of the advanced filter dialog.</phrase>
            </textobject>
           </mediaobject>
       </screenshot>
     </figure>

     <para>``Filter in-place'' writes the new table in-place.  Note
     that you will lose all the rows in the table that will not match
     the criteria.  ``Copy to a new location'' copies the selected
     rows into the same sheet but into the specified cell range.  Type
     the cell range into the ``Copy to'' entry if you want this action
     to happen.  The other options let you to copy the selected rows
     into a new sheet or a new workbook.</para>

     <para>You should then specify the cell range containing the table
     to be filtered in the ``List range'' entry.  The cell range
     containing the criteria is specified in the ``Criteria range''
     entry.  If the original table contains duplicate rows, you may
     also want to specify the ``Unique records only''.  If it is
     checked on, the filter removes all duplicates.</para>

     <para>To start the tool, you can then click the ``OK'' button and
     you will get the new table.</para>

  </sect2>



</sect1>
