home *** CD-ROM | disk | FTP | other *** search
/ Freelog 65 / Freelog065.iso / BAS / Bureautique / Gnumeric / gnumeric-1.3.92-rc1.exe / data-types.xml < prev    next >
Text File  |  2004-11-01  |  28KB  |  853 lines

  1. <sect1 id="sect-data-types">
  2.   <title>The Types of Cell Elements</title>
  3.   
  4.   <para>
  5.     Each cell in a <application>Gnumeric</application> worksheet can
  6.     contain only a single data element. These elements will have one
  7.     of five basic types: text, numbers, booleans, formulas, or
  8.     errors. During data entry, <application>Gnumeric</application>
  9.     assigns a default data type to the cell based on an analysis of
  10.     the cell contents. This assignment can be changed later if
  11.     <application>Gnumeric</application> makes the wrong
  12.     assignment. For information on how to change the data type of a
  13.     cell, see <xref linkend="sect-data-format" />.
  14.   </para>
  15.  
  16.   <para>
  17.     The five basic types of data which can be stored in a spreadsheet
  18.     cell are:
  19.     <variablelist>
  20.  
  21.        <varlistentry>
  22.          <term>Text</term>
  23.          <listitem>
  24.            <para>
  25.               A text element can contain a series of letters, numbers
  26.               or other contents. For example, the first cell in a
  27.               worksheet might contain the characters —This
  28.               worksheet describes the company's income — which
  29.               <application>Gnumeric</application> would interpret to
  30.               be text. In order to distinguish text elements from
  31.               number or formula elements, the text element may start
  32.               with a single quote. For instance, if a cell contained
  33.               only the three digits 345,
  34.               <application>Gnumeric</application> would consider that
  35.               to be the number three hundred and forty five. If this
  36.               cell is intended to be a string,
  37.               <application>Gnumeric</application> will store the cell
  38.               as '345. The newline character cannot be entered
  39.               directly but must be entered as <keycombo>
  40.               <keycap>Alt</keycap>
  41.               <keycap>Enter</keycap></keycombo>. For more information
  42.               on entering and formating text elements, see <xref
  43.               linkend="sect-data-text" />.
  44.             </para>
  45.           </listitem>
  46.         </varlistentry>
  47.  
  48.         <varlistentry>
  49.          <term>Numbers</term>
  50.          <listitem>
  51.            <para>
  52.               A number element can contain a series of digits (425)
  53.               but may include specific text and formatting characters
  54.               to indicate negative numbers (-345), decimal separator
  55.               (34.0567), thousand separators (12,342), currency ($23),
  56.               dates (21-10-1998), times (10:23) or scientific notation
  57.               (2.3e12). Dates may include the names of months or their
  58.               abbreviation. The currency, decimal separator and
  59.               thousands separator symbols vary depending on the locale
  60.               (the language and other location specific behaviour) to
  61.               which <application>Gnumeric</application> has been
  62.               set. See <xref linkend="sect-configuration-localization"
  63.               /> to understand how to change the locale. If you want a
  64.               number to be displayed as a plain string without any
  65.               number formatting, you can put a single quote (') before
  66.               it. For more information on entering and formating,
  67.               numeric elements see <xref
  68.               linkend="sect-data-numbers"/>.
  69.             </para>
  70.           </listitem>
  71.         </varlistentry>
  72.  
  73.  
  74.        <varlistentry>
  75.          <term>Boolean</term>
  76.          <listitem>
  77.            <para>
  78.               A boolean element can contain one of two values: TRUE
  79.               and FALSE. These are useful as inputs or outputs from
  80.               formulas and for boolean algebra.  More information on
  81.               boolean data elements is presented in <xref
  82.               linkend="sect-data-boolean" />.
  83.             </para>
  84.           </listitem>
  85.         </varlistentry>
  86.  
  87.  
  88.        <varlistentry>
  89.          <term>Formulas</term>
  90.          <listitem>
  91.            <para>
  92.              A formula is an instruction to
  93.              <application>Gnumeric</application> which describes a
  94.              calculation which should be performed
  95.              automatically. These formulas can contain standard
  96.              arithmetic elements but can also contain references to
  97.              other cells. Calculations which depend on other cells are
  98.              usually recalculated when the values of another cell
  99.              changes. Formulas always begin with a special character
  100.              — the equals sign (=). The commercial at symbol (@)
  101.              can be used instead of the equals sign during data entry
  102.              but <application>Gnumeric</application> will convert this
  103.              to an equals sign. Alternatively, an entry which
  104.              describes a calculation and which starts with either the
  105.              plus (+) or minus symbol (-) will be converted to a
  106.              formula starting with an equals sign. For a more complete
  107.              explanation of formulas, see <xref
  108.              linkend="sect-data-formulas" />.
  109.             </para>
  110.  
  111.            <para>
  112.            A cell reference is the part of a formula which refers to
  113.            another cell.  For example, in the formula to add two cells
  114.            =(A4+A1), both A4 and A1 are cell references. These
  115.            references can be quite complex referring to cells in
  116.            different worksheets or even in different files. See <xref
  117.            linkend="sect-data-formulas-references" /> for a complete
  118.            explanation of references.
  119.             </para>
  120.  
  121.           </listitem>
  122.         </varlistentry>
  123.  
  124.  
  125.        <varlistentry>
  126.          <term>Error</term>
  127.          <listitem>
  128.            <para>
  129.               An error element describes the failure to calculate the
  130.               result of a formula. These values are rarely entered
  131.               directly by a user but usually are the display given
  132.               when a formula cannot be correctly calculated.  See
  133.               <xref linkend="sect-data-errors" /> for a complete list
  134.               of error values and their explanation.
  135.             </para>
  136.           </listitem>
  137.         </varlistentry>
  138.  
  139.     </variablelist>
  140.   </para>
  141.  
  142.   <note>
  143.     <para>
  144.       A cell may display a series of hash marks (######). This
  145.       indicates that the result is too wide to display in the cell
  146.       given the current font setting and the current column
  147.       width. When this occurs, the value in the cell can be seen in
  148.       two ways. If the cell is selected, the value will appear in the
  149.       data entry area (to the right of the equals button directly
  150.       above the cell grid). Alternatively, the column containing the
  151.       cell can be widened until the data contents become visible.
  152.     </para>
  153.   </note>
  154.  
  155.  
  156. <sect2 id="sect-data-text">
  157.   <title>Text Data Elements</title>
  158.  
  159.   <para>
  160.     Text elements consist of an arbitrary sequence of characters or
  161.     numbers entered into a cell. Because
  162.     <application>Gnumeric</application> automatically recognizes
  163.     certain sequences as numbers or formulas, certain sequences of
  164.     characters (such as sequences containing only digits or a text
  165.     element which starts with an equals sign) must be treated
  166.     specially to have them considered text. In order to force any
  167.     sequence to be considered text, the sequence can be started with
  168.     an apostrophe symbol (<keysym>'</keysym>). Alternatively, the
  169.     'number' format of the cell can be specified to be 'text' before
  170.     entering the characters, as explained in <xref
  171.     linkend="number-formatting-overview"/>. Text elements are the
  172.     simplest elements to enter into spreadsheet cells.
  173.   </para>
  174.  
  175.   <para> An example of a spreadsheet cell grid with cells containing
  176.   text is given in <xref linkend="fig-cell-with-text" />.
  177.  
  178.   <figure id="fig-cell-with-text">
  179.     <title>A Text Data Element in a Cell.</title>
  180.     <mediaobject>
  181.       <imageobject>
  182.     <imagedata fileref="figures/cell-with-text.png" format="PNG" />
  183.       </imageobject>
  184.     </mediaobject>
  185.   </figure>
  186.  
  187.   </para>
  188.  
  189.   <para>
  190.     Valid text entries include simple words, whole sentences and even
  191.     paragraphs.
  192.   </para>
  193.  
  194.   <note>
  195.     <para>
  196.       To include a newline in a cell, a special key combination is
  197.       required. A newline symbol can be inserted with the key
  198.       combination of
  199.       <keycombo><keysym>Alt</keysym><keysym>Enter</keysym></keycombo>.
  200.     </para>
  201.   </note>
  202.  
  203.  
  204. </sect2>      
  205.  
  206. <sect2 id="sect-data-numbers">
  207.   <title>Number Data Elements</title>
  208.  
  209. <!-- TODO: add influence of locale (decimal, thousands sep) on number format. -->
  210.  
  211.   <para>
  212.     Number data elements include a variety of data all of which are
  213.     stored and manipulated by <application>Gnumeric</application> as
  214.     numbers. This includes integers, decimal fractions, general
  215.     fractions, numbers in scientific notation, dates, times, and
  216.     currency values.
  217.   </para>
  218.  
  219.   <para>
  220.     Data are recognized as numbers when they are entered, dependent on
  221.     the format of the sequence of characters
  222.     entered. <application>Gnumeric</application> attempts to
  223.     intelligently guess the subtype of the data and match the data to
  224.     an existing format for numbered data. If it matches a data format,
  225.     <application>Gnumeric</application> will automatically assign the
  226.     datum to a data type and associate an appropriate display format
  227.     with the cell. The format recognition of
  228.     <application>Gnumeric</application> includes a wide variety of
  229.     data formats which are discussed in detail in <xref
  230.     linkend="number-formatting-overview" />.
  231.   </para>
  232.  
  233.   <para>
  234.     Because <application>Gnumeric</application> automatically guesses
  235.     the data type of a number being entered into a cell, this process
  236.     may have to be over-ridden for certain types of data. For
  237.     example, postal codes in the United States consist of a sequence
  238.     of numbers which <application>Gnumeric</application> interprets as
  239.     an integer. However, U.S. postal codes can start with a leading
  240.     zero which <application>Gnumeric</application> discards by
  241.     default. In order to override the default format, the number
  242.     format of the cell must be specified before the entry of the
  243.     data. This is explained in <xref
  244.     linkend="number-formatting-overview" />, below.
  245.   </para>
  246.  
  247.  
  248. </sect2>      
  249.  
  250. <sect2 id="sect-data-boolean">
  251.   <title>Boolean Data Elements</title>
  252.   
  253.   <para>
  254.     Cells can contain boolean data elements. These elements arise from
  255.     Boolean logic which is a branch of mathematics. These elements are
  256.     useful for manipulation of formulas.
  257.   </para>
  258.  
  259.   <para>
  260.     Boolean values can be either "TRUE" or "FALSE". If these strings
  261.     are entered into a cell, <application>Gnumeric</application> will
  262.     recognize these as boolean values. These values can then be used
  263.     in formulas. Certain formulas will also return boolean values.
  264.   </para>
  265.  
  266. <!--
  267.   <example>
  268.     <para>
  269.       An example of a formula expression which uses booleans and
  270.       returns a boolean value:
  271.       <programlisting>
  272.         =
  273.  
  274.       </programlisting>
  275.     </para>
  276.   </example>
  277. -->
  278.  
  279.  
  280. </sect2>      
  281.  
  282.  
  283.  
  284.  
  285.  
  286. <sect2 id="sect-data-formulas">
  287.   <title>Formula Elements</title>
  288.   
  289. <!-- TODO: add explanation of operator precedence. -->
  290. <!-- TODO: add explanation of stacked division a/b/c. -->
  291.  
  292.   <para>
  293.     Formulas are the key to making a powerful spreadsheet. A formula
  294.     instructs <application>Gnumeric</application> to perform
  295.     calculations and display the results. These calculations are
  296.     defined as a formula data elements. The power of these formulas
  297.     arises because these formulas can include the contents of other
  298.     cells and the results of the formulas are updated automatically
  299.     when the contents of any cell included in the formula change. The
  300.     contents of other cells are included using "cell references" which
  301.     are explained below.
  302.   </para>
  303.  
  304.   <para>
  305.     Any formula entered into a cell must follow a specific syntax so
  306.     that <application>Gnumeric</application> can interpret the formula
  307.     correctly. This syntax closely follows mathematical notation but
  308.     also includes spreadsheet formulas, object names and cell
  309.     references.
  310.   </para>
  311.     
  312.   <sect3>
  313.     <title>Syntax</title>
  314.     
  315.     <para>
  316.       Formulas are distinguished from regular data by starting with an
  317.       equals sign (=) as the first character. Everything following
  318.       this equals sign is evaluated as a formula.
  319.     </para>
  320.  
  321.     <tip>
  322.       <title>Alternate Beginnings for Formulas</title>
  323.  
  324.       <para>
  325.         To accommodate those more familiar with Lotus spreadsheets,
  326.         Gnumeric recognizes the commercial at symbol (@) as the
  327.         beginning of a formula and substitutes an equals sign.  The
  328.         plus and minus characters (+ and -) may also start formulas
  329.         that involve calculation, but when used in front of a single
  330.         number only indicate the sign of the number.
  331.       </para>
  332.     </tip>
  333.  
  334.     <para>
  335.       The simplest formulas just use the standard math operator and
  336.       symbols.  Addition, subtraction, multiplication, and division
  337.       are represented by +, -, *, and /, just as you would expect.
  338.       +,- can be placed in front of numbers to indicate sign, as well.
  339.       
  340.       <example id="standardoperators">
  341.         <title>Examples of standard operators</title>
  342.         <programlisting>
  343. =5+5            returns 10.
  344.     
  345. =5-4            returns 1.
  346.     
  347. =-5             returns -5.
  348.     
  349. =5*5            returns 25.
  350.  
  351. =(5*5)+11       returns 36.
  352.     
  353. =(5*5)+(49/7)   returns 32.
  354.         </programlisting>
  355.       </example>
  356.     </para>
  357.  
  358.     <para>
  359.       Formulas can result in error values in several instances. If a
  360.       formula is entered incorrectly,
  361.       <application>Gnumeric</application> will display a warning and
  362.       allow either the formula to be corrected or will save the
  363.       formula as text for editing later. If a syntactically correct
  364.       formula results in a nonsensical calculation (for instance, a
  365.       division by zero), then an error value will be displayed
  366.       indicating the error.
  367.     </para>
  368.  
  369.   </sect3>
  370.  
  371.  
  372.  
  373.   <sect3>
  374.     <title>Using Functions</title>
  375.     
  376.     <para>
  377.       Formulas can also contain functions which denote the use of
  378.       standard mathematical, business, statistical, and scientific
  379.       calculations. These functions take the place of any data element
  380.       in a formula and can therefore be combined with the standard
  381.       arithmetic operators described above.
  382.     </para>
  383.  
  384.     <para>
  385.       These functions have the form:
  386.     
  387.       <example id="basicfunctionsyntax">
  388.         <title>Basic Function syntax</title>
  389.         <programlisting>
  390. FUNCTIONNAME(ARGUMENTS)
  391.         </programlisting>
  392.       </example>
  393.  
  394.       where FUNCTIONNAME indicates the name of a function and
  395.       ARGUMENTS indicates one or more arguments to the function. The
  396.       function arguments are separated by commas (<keysym>,</keysym>).
  397.  
  398.     </para>
  399.  
  400.     <tip>
  401.       <para>
  402.         While the documentation generally refers to functions and to
  403.         cells in capital letters, their use is not actually case
  404.         sensitive.
  405.       </para>
  406.     </tip>
  407.  
  408.     <para>
  409.       Some examples of the use of functions are: 
  410.  
  411.     <example id="functionsyntax">
  412.       <title>Some examples of function syntax</title>
  413.       <programlisting>
  414. =SUM(A1,A2,A4,B5)
  415.         
  416. =AVERAGE(A1:A16)
  417.         
  418. =EXP(1)
  419.         
  420. =PI()
  421.         
  422. =3+4*MIN(A1,A2,B6)
  423.       </programlisting>
  424.     </example>
  425.  
  426.       The arguments of the functions vary in number from none, as in
  427.       the PI() function, to an unlimited number, as in the SUM()
  428.       function, depending on the type of function.
  429.     </para>
  430.  
  431.   </sect3>
  432.  
  433.  
  434.  
  435.   <sect3 id="sect-data-formulas-references">
  436.     <title>Cell Referencing</title>
  437.  
  438.     <para>
  439.       Formulas can include the displayed data from other cells. These
  440.       contents are described as `cell references' which are names
  441.       indicating that the contents of other cells should be used in
  442.       the calculation.
  443.     </para>
  444.  
  445.     <para>
  446.       Each cell in a spreadsheet is named by its column and row
  447.       labels. The column labels are letters and the row labels are
  448.       numbers. The first cell, therefore, is called A1. One column
  449.       over and two rows down from cell A1 is the cell B3. The right
  450.       most and bottom most cell is cell IV65536 which is the cell in
  451.       column IV and in row 65536.
  452.     </para>
  453.  
  454.     <para>
  455.       The value of a cell can be used in a formula simply by entering
  456.       its name where a number value would otherwise occur. For
  457.       example, to have the data in cell B1 appear in another cell,
  458.       enter =B1 into that cell. Other more complex examples include:
  459.   
  460.       <example id="simplecellrefer">
  461.         <title>Some examples of simple cell reference syntax</title>
  462.  
  463.         <programlisting>
  464. =A1+EXP(B1)-(C3/C4)
  465.       
  466. =COS(A2)*SIN(A2)
  467.         </programlisting>
  468.       </example>
  469.     </para>
  470.   
  471.     <sect4>
  472.       <title>Absolute cell referencing</title>
  473.  
  474.       <para>
  475.         Cells can be referenced in the default way (relative
  476.         referencing), or by using absolute referencing. Absolute
  477.         referencing means that when the cell is copied, the cell
  478.         reference does not change. Normally, auto-filling a cell range
  479.         or moving cell will change its cell reference to so that it
  480.         maintains a relation to the original cell. Absolute
  481.         referencing prevents these changes.
  482.       </para>
  483.  
  484.       <tip id="why-bother">
  485.         <title>When Does Relative Referencing Make a Difference?</title>
  486.         <para>
  487.           The difference between absolute and relative cell references
  488.           only matters if you are copying or moving cells that contain
  489.           cell references. For cells that are going to remain in
  490.           place, both the relative and absolute references have the
  491.           same result.
  492.         </para>
  493.       </tip>
  494.  
  495.       <example id="relative-referencing-explained">
  496.         <title>Relative References</title>
  497.           <para>
  498.             For example, if =A1 is the formula entered into cell B2,
  499.             cell B2 will display the data in cell A1, which is one row
  500.             up and one column left.  Then, if you copy the contents of
  501.             B2 to cell F6, cell F6 will contain the value from E5,
  502.             which is also one row up and one column left.
  503.           </para>
  504.  
  505.           <para>
  506.             For the copied cell to still refer to A1, specify absolute
  507.             references using the $ character: $A$1 refers to cell A1,
  508.             no matter where it is copied.
  509.           </para>
  510.         </example>
  511.  
  512.       <para>
  513.         The format for absolute cell referencing is to use a '$' in
  514.         front of the cell coordinate that the you want to stay
  515.         constant. The column, row, sheet, or any combination of these
  516.         can be held constant.
  517.       </para>
  518.  
  519.       <example id="cell-refer-absolute-reference">
  520.         <title>Absolute cell referencing examples</title>
  521.  
  522.         <para>
  523.           What happens when a given formula is entered into cell B2,
  524.           then copied to other cells?
  525.     <variablelist>
  526.       <varlistentry>
  527.         <term>=A1</term> 
  528.             <listitem>
  529.               <para>
  530.                 =A1 is a normal, or relative, cell reference
  531.                 function. When =A1 is entered into cell B2, it refers
  532.                 to the value of data one cell up and one cell left
  533.                 from the cell with the reference. Therefore, if this
  534.                 formula were copied from cell B2 to cell C2, the value
  535.                 displayed in cell C2 will be the value of data in cell
  536.                 B1.  Copied to cell R19, the formula will display the
  537.                 data in cell Q18.
  538.               </para>
  539.             </listitem>
  540.       </varlistentry>
  541.  
  542.       <varlistentry>
  543.         <term>=$A1</term>
  544.             <listitem>
  545.               <para>
  546.                 In this case, the column value is absolute, but the
  547.                 row value is relative.  Therefore, if =$A1 is entered
  548.                 into cell B2, the formula refers to the data in column
  549.                 A that is one row up from the current location.
  550.                 Copied to cell C2, the formula will refer to the data
  551.                 in cell A1. Copied to cell R19, it will refer to the
  552.                 data in A18.
  553.               </para>
  554.             </listitem>
  555.       </varlistentry>
  556.  
  557.       <varlistentry>
  558.         <term>=A$1</term>
  559.             <listitem>
  560.               <para>
  561.                 This formula uses a relative column value and an
  562.                 absolute row value. In cell B2, it refers to cell A1
  563.                 as the data in the cell one column left and in row
  564.                 1. Copied to cell C3, the formula will display the
  565.                 data in cell B1.
  566.               </para>
  567.             </listitem>
  568.       </varlistentry>
  569.  
  570.       <varlistentry>
  571.         <term>=$A$1</term>
  572.             <listitem>
  573.               <para>
  574.                 No matter where this formula is copied, it will always
  575.                 refer to the data in cell A1.
  576.               </para>
  577.             </listitem>
  578.       </varlistentry>
  579.     </variablelist>
  580.         </para>
  581.       </example>
  582.     </sect4>
  583.  
  584.  
  585.     <sect4>
  586.       <title>Referencing multiple cells</title>
  587.     
  588.       <para>
  589.         Many functions can take multiple cells as arguments. This can
  590.         either be a comma separated list, an array, or any combination
  591.         thereof.
  592.       </para>
  593.     
  594.       <sect5>
  595.         <title>Multiple individual cells</title>
  596.       
  597.         <para>
  598.           A comma separated list of cell references can be used to
  599.           indicate cells that are discontinuous.
  600.         </para>
  601.       
  602.       
  603.         <example id="cellrefermutiplecells">
  604.       <title>Some examples of function syntax</title>
  605.       <programlisting>
  606. =SUM(A1,B2,C4)
  607.       
  608. =MIN(A1,B2,C4,C5,D6)
  609.       </programlisting>
  610.         </example>
  611.       
  612.       
  613.         <screenshot>
  614.       <mediaobject>
  615.             <imageobject>
  616.               <imagedata fileref="figures/cells-1.png" format="PNG" />
  617.             </imageobject>
  618.             <textobject>
  619.               <phrase>An image of a worksheet with a function.</phrase>
  620.             </textobject>
  621.            </mediaobject>
  622.         </screenshot>
  623.  
  624.       </sect5>
  625.     
  626.       <sect5>
  627.         <title>Referencing a continuous region of cells</title>
  628.       
  629.         <para>
  630.           For functions that take more than one argument, it is often
  631.           easier to reference the cells as a group. This can include
  632.           cells in sets horizontally, vertically, or in arrays.
  633.         </para>
  634.       
  635.         <para>
  636.           The ':' operator is used to indicate a range of cells. The
  637.           basic syntax is upper left corner:bottom right
  638.           corner.
  639.         </para>
  640.       
  641.         <example id="cellrefercontin">
  642.       <title>Referencing blocks of cells</title>
  643.       <programlisting>
  644. =SUM(A1:E1)
  645.       
  646. =AVERAGE(B4:E7)
  647.       
  648. =MIN(A1:A5)            
  649.       </programlisting>
  650.         </example>
  651.       
  652.       
  653.         <screenshot>
  654.       <mediaobject>
  655.             <imageobject>
  656.               <imagedata fileref="figures/cells-2.png" format="PNG" />
  657.             </imageobject>
  658.             <textobject>
  659.               <phrase>An image of a worksheet with a function
  660.               referencing a block of cells.</phrase>
  661.             </textobject>
  662.            </mediaobject>
  663.         </screenshot>
  664.       </sect5>
  665.     
  666.       <sect5>
  667.         <title>Referencing non-continuous regions</title>
  668.       
  669.         <para>
  670.           For referencing cells that are in non-continuous regions,
  671.           you can use any combination of the above methods to get the
  672.           needed cells.
  673.         </para>
  674.       
  675.       
  676.     <example id="cellreferdiscontin">
  677.       <title>Referencing blocks of cells</title>
  678.       <programlisting>
  679. =SUM(A1:E1, B19, L14:L17)
  680.       
  681. =AVERAGE(A1,A3, A5:C5)
  682.       </programlisting>
  683.         </example>
  684.       </sect5>
  685.     </sect4>
  686.  
  687.     <sect4>
  688.       <title>Referencing cells on other sheets</title>
  689.  
  690.       <para>
  691.         It is possible to reference cells which are not part of the
  692.         current sheet.  This is done using the SHEETNAME!CELLLIST
  693.         syntax, where SHEETNAME is an identifier (usually a sheet
  694.         name) and CELLLIST is a regular cell reference as described in
  695.         the previous sections.
  696.       </para>
  697.  
  698.       <para>
  699.         Note that if SHEETNAME contains spaces, you need to quote the
  700.         whole name to allow <application>Gnumeric</application> to
  701.         group the separate words in SHEETNAME as single name.  For
  702.         example, you should use 'Name With Spaces'.
  703.       </para>
  704.  
  705.       <example id="simple-sheet-ref">
  706.         <title>Referencing cells in other sheets</title>
  707.         <programlisting>
  708. ='Sheet 0'!A1+'Sheet 3'!A5
  709.  
  710. =SUM('Sheet 1'!A1:'Sheet 1'!A5)
  711.         </programlisting>
  712.       </example>
  713.  
  714.     </sect4>
  715.  
  716.     <sect4>
  717.       <title>Referencing cells on other files</title>
  718.  
  719.       <para>
  720.         It is possible to reference cells in other files. The
  721.         canonical form for these references is
  722.         =[filename]SHEETNAME!CELLLIST. Again, if the name of the file
  723.         contains spaces, it is necessary to surround the filename with
  724.         quotes.
  725.       </para>
  726.  
  727.       <example id="simple-file-ref">
  728.         <title>Referencing cells in other files</title>
  729.         <programlisting>
  730. =['Name of the file']'Sheet 0'!A1
  731.  
  732. =CEIL( ['First Version.gnumeric']'Sheet 1'!E20 )
  733.         </programlisting>
  734.       </example>
  735.  
  736.     </sect4>
  737.  
  738.  
  739.   </sect3>
  740.  
  741.  
  742.  
  743.   <sect3 id="formulas-names">
  744.     <title>Names</title>
  745.  
  746.     <para>
  747.       Names are labels which have a meaning defined by the user. Names
  748.       can be defined to apply to a whole workbook or to a particular
  749.       sheet in a workbook. Names can refer to a numeric value, to a
  750.       particular range of cells, or to part of a formula. The name can
  751.       be used wherever its meaning could otherwise be used.
  752.     </para>
  753.  
  754.     <example id="namesyntax">
  755.       <title>Examples of name usage</title>
  756.  
  757.       <para>
  758.         If myCellRange is defined as '$A$1:$B$500' and my_E_Constant is
  759.         defined as 2.71828182845 then we can have:
  760.       </para>
  761.  
  762.       <programlisting>
  763. =VLOOKUP(C1, "gnu", myCellRange, 2, 0)
  764.  
  765. =LN(my_E_Constant)
  766.  
  767. =SUM(myCellRange, my_E_Constant)
  768.       </programlisting>
  769.     </example>
  770.  
  771.     <para>
  772.       Names are defined using the <guimenu>Insert</guimenu>
  773.       <guimenuitem>Name</guimenuitem> dialog. This allows manipulation
  774.       of all the names in the related workbook. A name can have any
  775.       form except that it cannot consist of a number, of the name of a
  776.       sheet or of that of a function, since this would cause
  777.       confusion.
  778.     </para>
  779.  
  780.     <para>
  781.       In addition to the names defined by the user,
  782.       <application>Gnumeric</application> has some pre-defined names
  783.       for useful elements. These are:
  784.     </para>
  785.  
  786.     <itemizedlist>
  787.       <listitem>
  788.         <para>
  789.           "Sheet_Title:" this returns the name of the current
  790.           sheet
  791.         </para>
  792.       </listitem>
  793.     </itemizedlist>
  794.  
  795.   </sect3>
  796.  
  797.   <sect3>
  798.     <title>Array Formulas</title>
  799.     
  800.     <para>
  801.       It is periodically useful or necessary to have an expression
  802.       return a matrix rather than a single value.  The first example
  803.       most people think of are matrix operations such as
  804.       multiplication, transpose, and inverse.  A less obvious usage is
  805.       for data retrieval routines (databases, realtime data-feeds) or
  806.       functions with vector results (yield curve calculations).
  807.     </para>
  808.     
  809.     <example id="arrayformulacreate">
  810.       <title>Entering an Array Formula</title>
  811.       <para>
  812.         An array formula is currently entered by selecting the single
  813.         range in which to store the result, entering the array
  814.         formula, and hitting the key combination,
  815.         <keycombo>
  816.           <keycap>Ctrl</keycap>
  817.           <keycap>Shift</keycap>
  818.           <keycap>Enter</keycap>
  819.         </keycombo>.
  820.       </para>
  821.  
  822.       <para>
  823.         The result is displayed as :
  824.       </para>
  825.  
  826.       <programlisting>
  827. ={FUNCTION(ARGUMENTS)}(num_rows, num_cols)[row][column]
  828.       </programlisting>
  829.     </example>
  830.  
  831.   </sect3>
  832.  
  833.  
  834. </sect2>
  835.              
  836.  
  837.  
  838.  
  839.  
  840. <sect2 id="sect-data-errors">
  841.   <title>Error Elements</title>
  842.   
  843.   <para>
  844.     Cells can display error values if the formula contained in the
  845.     cell cannot be solved or if other anomalous conditions occur.
  846.   </para>
  847.  
  848.  
  849. </sect2>
  850.  
  851.  
  852. </sect1>
  853.