Update ooo320-m1
[ooovba.git] / helpcontent2 / source / text / scalc / 01 / 04060109.xhp
blobab908805186d0d754bd1db4df0bba8a7bfd36d11
1 <?xml version="1.0" encoding="UTF-8"?>
2 <helpdocument version="1.0">
4 <!--
5 ***********************************************************************
7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
8 *
9 * Copyright 2008 by Sun Microsystems, Inc.
11 * OpenOffice.org - a multi-platform office productivity suite
13 * $RCSfile: soffice2xmlhelp.xsl,v $
14 * $Revision: 1.10 $
16 * This file is part of OpenOffice.org.
18 * OpenOffice.org is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU Lesser General Public License version 3
20 * only, as published by the Free Software Foundation.
22 * OpenOffice.org is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU Lesser General Public License version 3 for more details
26 * (a copy is included in the LICENSE file that accompanied this code).
28 * You should have received a copy of the GNU Lesser General Public License
29 * version 3 along with OpenOffice.org. If not, see
30 * <http://www.openoffice.org/license.html>
31 * for a copy of the LGPLv3 License.
33 ************************************************************************
34 -->
37 <meta>
38 <topic id="textscalc0104060109xml" indexer="include">
39 <title xml-lang="en-US" id="tit">Spreadsheet Functions</title>
40 <filename>/text/scalc/01/04060109.xhp</filename>
41 </topic>
42 </meta>
43 <body>
44 <bookmark xml-lang="en-US" branch="index" id="bm_id3148522"><bookmark_value>spreadsheets; functions</bookmark_value>
45 <bookmark_value>Function Wizard; spreadsheets</bookmark_value>
46 <bookmark_value>functions; spreadsheets</bookmark_value>
47 </bookmark>
48 <paragraph xml-lang="en-US" id="hd_id3148522" role="heading" level="1" l10n="U" oldref="1">Spreadsheet Functions</paragraph>
49 <paragraph xml-lang="en-US" id="par_id3144508" role="paragraph" l10n="U" oldref="2"><variable id="tabelletext">This section contains descriptions of the <emph>Spreadsheet</emph> functions together with an example.
50 </variable></paragraph>
51 <section id="howtoget">
52 <embed href="text/scalc/00/00000404.xhp#efefft"/>
53 </section>
54 <sort order="asc">
55 <section id="Section1">
56 <bookmark xml-lang="en-US" branch="index" id="bm_id3146968"><bookmark_value>ADDRESS function</bookmark_value>
57 </bookmark>
58 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_ADRESSE" id="bm_id3147546" localize="false"/>
59 <paragraph xml-lang="en-US" id="hd_id3146968" role="heading" level="2" l10n="U" oldref="3">ADDRESS</paragraph>
60 <paragraph xml-lang="en-US" id="par_id3155762" role="paragraph" l10n="CHG" oldref="4"><ahelp hid="HID_FUNC_ADRESSE">Returns a cell address (reference) as text, according to the specified row and column numbers.</ahelp> You can determine whether the address is interpreted as an absolute address (for example, $A$1) or as a relative address (as A1) or in a mixed form (A$1 or $A1). You can also specify the name of the sheet.</paragraph>
61 <section id="r1c1">
62 <paragraph xml-lang="en-US" id="par_id1027200802301348" role="paragraph" l10n="NEW">For interoperability the ADDRESS and INDIRECT functions support an optional parameter to specify whether the R1C1 address notation instead of the usual A1 notation should be used.</paragraph>
63 <paragraph xml-lang="en-US" id="par_id1027200802301445" role="paragraph" l10n="NEW">In ADDRESS, the parameter is inserted as the fourth parameter, shifting the optional sheet name parameter to the fifth position.</paragraph>
64 <paragraph xml-lang="en-US" id="par_id102720080230153" role="paragraph" l10n="NEW">In INDIRECT, the parameter is appended as the second parameter.</paragraph>
65 <paragraph xml-lang="en-US" id="par_id102720080230151" role="paragraph" l10n="NEW">In both functions, if the argument is inserted with the value 0, then the R1C1 notation is used. If the argument is not given or has a value other than 0, then the A1 notation is used. </paragraph>
66 <paragraph xml-lang="en-US" id="par_id1027200802301556" role="paragraph" l10n="NEW">In case of R1C1 notation, ADDRESS returns address strings using the exclamation mark '!' as the sheet name separator, and INDIRECT expects the exclamation mark as sheet name separator. Both functions still use the dot '.' sheet name separator with A1 notation.</paragraph>
67 <paragraph xml-lang="en-US" id="par_id1027200802301521" role="paragraph" l10n="NEW">When opening documents from ODF 1.0/1.1 format, the ADDRESS functions that show a sheet name as the fourth paramater will shift that sheet name to become the fifth parameter. A new fourth parameter with the value 1 will be inserted.</paragraph>
68 <paragraph xml-lang="en-US" id="par_id1027200802301650" role="paragraph" l10n="NEW">When storing a document in ODF 1.0/1.1 format, if ADDRESS functions have a fourth parameter, that parameter will be removed.</paragraph>
69 <paragraph xml-lang="en-US" id="par_id102720080230162" role="note" l10n="NEW">Do not save a spreadsheet in the old ODF 1.0/1.1 format if the ADDRESS function's new fourth parameter was used with a value of 0.</paragraph>
70 <paragraph xml-lang="en-US" id="par_id1027200802301756" role="note" l10n="NEW">The INDIRECT function is saved without conversion to ODF 1.0/1.1 format. If the second parameter was present, an older version of Calc will return an error for that function.</paragraph>
71 </section>
72 <paragraph xml-lang="en-US" id="hd_id3151196" role="heading" level="3" l10n="U" oldref="5">Syntax</paragraph>
73 <paragraph xml-lang="en-US" id="par_id3154707" role="code" l10n="U" oldref="6">ADDRESS(Row; Column; Abs; A1; "Sheet")</paragraph>
74 <paragraph xml-lang="en-US" id="par_id3147505" role="paragraph" l10n="U" oldref="7">
75 <emph>Row</emph> represents the row number for the cell reference</paragraph>
76 <paragraph xml-lang="en-US" id="par_id3145323" role="paragraph" l10n="U" oldref="8">
77 <emph>Column</emph> represents the column number for the cell reference (the number, not the letter)</paragraph>
78 <paragraph xml-lang="en-US" id="par_id3153074" role="paragraph" l10n="U" oldref="9">
79 <emph>Abs</emph> determines the type of reference:</paragraph>
80 <paragraph xml-lang="en-US" id="par_id3153298" role="paragraph" l10n="CHG" oldref="10">1: absolute ($A$1)</paragraph>
81 <paragraph xml-lang="en-US" id="par_id3150431" role="paragraph" l10n="U" oldref="11">2: row reference type is absolute; column reference is relative (A$1)</paragraph>
82 <paragraph xml-lang="en-US" id="par_id3146096" role="paragraph" l10n="U" oldref="12">3: row (relative); column (absolute) ($A1)</paragraph>
83 <paragraph xml-lang="en-US" id="par_id3153334" role="paragraph" l10n="U" oldref="13">4: relative (A1)</paragraph>
84 <paragraph xml-lang="en-US" id="par_id1027200802465915" role="paragraph" l10n="NEW">
85 <emph>A1</emph> (optional) - if set to 0, the R1C1 notation is used. If this parameter is absent or set to another value than 0, the A1 notation is used.</paragraph>
86 <paragraph xml-lang="en-US" id="par_id3153962" role="paragraph" l10n="U" oldref="14">
87 <emph>Sheet</emph> represents the name of the sheet. It must be placed in double quotes.</paragraph>
88 <paragraph xml-lang="en-US" id="hd_id3147299" role="heading" level="3" l10n="U"
89 oldref="15">Example:</paragraph>
90 <paragraph xml-lang="en-US" id="par_id3148744" role="paragraph" l10n="CHG" oldref="16">
91 <item type="input">=ADDRESS(1;1;2;;"Sheet2")</item> returns the following: Sheet2.A$1<comment>i 101187</comment></paragraph>
92 <paragraph xml-lang="en-US" id="par_id3159260" role="paragraph" l10n="U" oldref="17">If the cell A1 in sheet 2 contains the value <item type="input">-6</item>, you can refer indirectly to the referenced cell using a function in B2 by entering <item type="input">=ABS(INDIRECT(B2))</item>. The result is the absolute value of the cell reference specified in B2, which in this case is 6.</paragraph>
93 </section>
94 <section id="Section2">
95 <bookmark xml-lang="en-US" branch="index" id="bm_id3150372"><bookmark_value>AREAS function</bookmark_value>
96 </bookmark>
97 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_BEREICHE" id="bm_id3149721" localize="false"/>
98 <paragraph xml-lang="en-US" id="hd_id3150372" role="heading" level="2" l10n="U"
99 oldref="19">AREAS</paragraph>
100 <paragraph xml-lang="en-US" id="par_id3150036" role="paragraph" l10n="U" oldref="20"><ahelp hid="HID_FUNC_BEREICHE">Returns the number of individual ranges that belong to a multiple range.</ahelp> A range can consist of contiguous cells or a single cell.</paragraph>
101 <paragraph xml-lang="en-US" id="par_id061020090307073" role="paragraph" l10n="NEW">The function expects a single argument. If you state multiple ranges, you must enclose them into additional parentheses. Multiple ranges can be entered using the semicolon (;) as divider, but this gets automatically converted to the tilde (~) operator. The tilde is used to join ranges.</paragraph>
102 <paragraph xml-lang="en-US" id="hd_id3145222" role="heading" level="3" l10n="U"
103 oldref="21">Syntax</paragraph>
104 <paragraph xml-lang="en-US" id="par_id3155907" role="code" l10n="U" oldref="22">AREAS(Reference)</paragraph>
105 <paragraph xml-lang="en-US" id="par_id3153118" role="paragraph" l10n="U" oldref="23">Reference represents the reference to a cell or cell range.</paragraph>
106 <paragraph xml-lang="en-US" id="hd_id3148891" role="heading" level="3" l10n="U"
107 oldref="24">Example</paragraph>
108 <paragraph xml-lang="en-US" id="par_id3149946" role="paragraph" l10n="U" oldref="25">
109 <item type="input">=AREAS((A1:B3;F2;G1))</item> returns 3, as it is a reference to three cells and/or areas. After entry this gets converted to =AREAS((A1:B3~F2~G1)).</paragraph>
110 <paragraph xml-lang="en-US" id="par_id3146820" role="paragraph" l10n="U" oldref="26">
111 <item type="input">=AREAS(All)</item> returns 1 if you have defined an area named All under <emph>Data - Define Range</emph>.</paragraph>
112 </section>
113 <section id="Section3">
114 <bookmark xml-lang="en-US" branch="index" id="bm_id3148727"><bookmark_value>DDE function</bookmark_value>
115 </bookmark>
116 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_DDE" id="bm_id3154680" localize="false"/>
117 <paragraph xml-lang="en-US" id="hd_id3148727" role="heading" level="2" l10n="U"
118 oldref="28">DDE</paragraph>
119 <paragraph xml-lang="en-US" id="par_id3149434" role="paragraph" l10n="U" oldref="29"><ahelp hid="HID_FUNC_DDE">Returns the result of a DDE-based link.</ahelp> If the contents of the linked range or section changes, the returned value will also change. You must reload the spreadsheet or choose <emph>Edit - Links</emph> to see the updated links. Cross-platform links, for example from a <item type="productname">%PRODUCTNAME</item> installation running on a Windows machine to a document created on a Linux machine, are not allowed.</paragraph>
120 <paragraph xml-lang="en-US" id="hd_id3150700" role="heading" level="3" l10n="U"
121 oldref="30">Syntax</paragraph>
122 <paragraph xml-lang="en-US" id="par_id3148886" role="code" l10n="U" oldref="31">DDE("Server"; "File"; "Range"; Mode)</paragraph>
123 <paragraph xml-lang="en-US" id="par_id3154842" role="paragraph" l10n="U" oldref="32">
124 <emph>Server</emph> is the name of a server application. <item type="productname">%PRODUCTNAME</item>applications have the server name "Soffice".</paragraph>
125 <paragraph xml-lang="en-US" id="par_id3153034" role="paragraph" l10n="U" oldref="33">
126 <emph>File</emph> is the complete file name, including path specification.</paragraph>
127 <paragraph xml-lang="en-US" id="par_id3147472" role="paragraph" l10n="U" oldref="34">
128 <emph>Range</emph> is the area containing the data to be evaluated.</paragraph>
129 <paragraph xml-lang="en-US" id="par_id3152773" role="paragraph" l10n="U" oldref="184">
130 <emph>Mode</emph> is an optional parameter that controls the method by which the DDE server converts its data into numbers.</paragraph>
131 <table id="tbl_id3155828">
132 <tablerow>
133 <tablecell>
134 <paragraph xml-lang="en-US" id="par_id3154383" role="paragraph" l10n="U" oldref="185">
135 <emph>Mode</emph>
136 </paragraph>
137 </tablecell>
138 <tablecell>
139 <paragraph xml-lang="en-US" id="par_id3145146" role="paragraph" l10n="U" oldref="186">
140 <emph>Effect</emph>
141 </paragraph>
142 </tablecell>
143 </tablerow>
144 <tablerow>
145 <tablecell>
146 <paragraph xml-lang="en-US" id="par_id3154558" role="paragraph" l10n="U" oldref="187">0 or missing</paragraph>
147 </tablecell>
148 <tablecell>
149 <paragraph xml-lang="en-US" id="par_id3145596" role="paragraph" l10n="U" oldref="188">Number format from the "Default" cell style</paragraph>
150 </tablecell>
151 </tablerow>
152 <tablerow>
153 <tablecell>
154 <paragraph xml-lang="en-US" id="par_id3152785" role="paragraph" l10n="U" oldref="189">1</paragraph>
155 </tablecell>
156 <tablecell>
157 <paragraph xml-lang="en-US" id="par_id3154380" role="paragraph" l10n="U" oldref="190">Data are always interpreted in the standard format for US English</paragraph>
158 </tablecell>
159 </tablerow>
160 <tablerow>
161 <tablecell>
162 <paragraph xml-lang="en-US" id="par_id3150279" role="paragraph" l10n="U" oldref="191">2</paragraph>
163 </tablecell>
164 <tablecell>
165 <paragraph xml-lang="en-US" id="par_id3153775" role="paragraph" l10n="U" oldref="192">Data are retrieved as text; no conversion to numbers</paragraph>
166 </tablecell>
167 </tablerow>
168 </table>
170 <paragraph xml-lang="en-US" id="hd_id3149546" role="heading" level="3" l10n="U"
171 oldref="35">Example</paragraph>
172 <paragraph xml-lang="en-US" id="par_id3148734" role="paragraph" l10n="U" oldref="36">
173 <item type="input">=DDE("soffice";"c:\office\document\data1.sxc";"sheet1.A1")</item> reads the contents of cell A1 in sheet1 of the <item type="productname">%PRODUCTNAME</item> Calc spreadsheet data1.sxc.</paragraph>
174 <paragraph xml-lang="en-US" id="par_id3153081" role="paragraph" l10n="U" oldref="37">
175 <item type="input">=DDE("soffice";"c:\office\document\motto.sxw";"Today's motto")</item> returns a motto in the cell containing this formula. First, you must enter a line in the motto.sxw document containing the motto text and define it as the first line of a section named <item type="literal">Today's Motto</item> (in <item type="productname">%PRODUCTNAME</item> Writer under <emph>Insert - Section</emph>). If the motto is modified (and saved) in the <item type="productname">%PRODUCTNAME</item> Writer document, the motto is updated in all <item type="productname">%PRODUCTNAME</item> Calc cells in which this DDE link is defined.</paragraph>
176 </section>
177 <section id="Section4">
178 <bookmark xml-lang="en-US" branch="index" id="bm_id3153114"><bookmark_value>ERRORTYPE function</bookmark_value>
179 </bookmark>
180 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_FEHLERTYP" id="bm_id3153000" localize="false"/>
181 <paragraph xml-lang="en-US" id="hd_id3153114" role="heading" level="2" l10n="U"
182 oldref="38">ERRORTYPE</paragraph>
183 <paragraph xml-lang="en-US" id="par_id3148568" role="paragraph" l10n="U" oldref="39"><ahelp hid="HID_FUNC_FEHLERTYP">Returns the number corresponding to an <link href="text/scalc/05/02140000.xhp" name="error value">error value</link> occurring in a different cell.</ahelp> With the aid of this number, you can generate an error message text.</paragraph>
184 <embed href="text/shared/00/00000001.xhp#wahr"/>
185 <paragraph xml-lang="en-US" id="par_id3149877" role="note" l10n="U" oldref="40">The Status Bar displays the predefined error code from <item type="productname">%PRODUCTNAME</item> if you click the cell containing the error.</paragraph>
186 <paragraph xml-lang="en-US" id="hd_id3154327" role="heading" level="3" l10n="U"
187 oldref="41">Syntax</paragraph>
188 <paragraph xml-lang="en-US" id="par_id3151322" role="code" l10n="U" oldref="42">ERRORTYPE(Reference)</paragraph>
189 <paragraph xml-lang="en-US" id="par_id3150132" role="paragraph" l10n="U" oldref="43">
190 <emph>Reference</emph> contains the address of the cell in which the error occurs.</paragraph>
191 <paragraph xml-lang="en-US" id="hd_id3145248" role="heading" level="3" l10n="U"
192 oldref="44">Example</paragraph>
193 <paragraph xml-lang="en-US" id="par_id3146904" role="paragraph" l10n="U" oldref="45">If cell A1 displays Err:518, the function <item type="input">=ERRORTYPE(A1)</item> returns the number 518.</paragraph>
194 </section>
195 <section id="Section5">
196 <bookmark xml-lang="en-US" branch="index" id="bm_id3151221"><bookmark_value>INDEX function</bookmark_value>
197 </bookmark>
198 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_INDEX" id="bm_id3157989" localize="false"/>
199 <paragraph xml-lang="en-US" id="hd_id3151221" role="heading" level="2" l10n="U"
200 oldref="47">INDEX</paragraph>
201 <paragraph xml-lang="en-US" id="par_id3150268" role="paragraph" l10n="CHG" oldref="48"><ahelp hid="HID_FUNC_INDEX">INDEX returns a sub range, specified by row and column number, or an optional range index. Depending on context, INDEX returns a reference or content.</ahelp><comment>UFI: will change with i4904; see http://so-web.germany.sun.com/iBIS/servlet/edit.ControlPanel?tid=i57108</comment><comment>changed by i83070</comment></paragraph>
202 <paragraph xml-lang="en-US" id="hd_id3156063" role="heading" level="3" l10n="U"
203 oldref="49">Syntax</paragraph>
204 <paragraph xml-lang="en-US" id="par_id3149007" role="code" l10n="U" oldref="50">INDEX(Reference; Row; Column; Range)</paragraph>
205 <paragraph xml-lang="en-US" id="par_id3153260" role="paragraph" l10n="CHG" oldref="51">
206 <emph>Reference</emph> is a reference, entered either directly or by specifying a range name. If the reference consists of multiple ranges, you must enclose the reference or range name in parentheses.</paragraph>
207 <paragraph xml-lang="en-US" id="par_id3145302" role="paragraph" l10n="CHG" oldref="52">
208 <emph>Row</emph> (optional) represents the row index of the reference range, for which to return a value. In case of zero (no specific row) all referenced rows are returned.</paragraph>
209 <paragraph xml-lang="en-US" id="par_id3154628" role="paragraph" l10n="CHG" oldref="53">
210 <emph>Column</emph> (optional) represents the column index of the reference range, for which to return a value. In case of zero (no specific column) all referenced columns are returned.</paragraph>
211 <paragraph xml-lang="en-US" id="par_id3155514" role="paragraph" l10n="U" oldref="54">
212 <emph>Range</emph> (optional) represents the index of the subrange if referring to a multiple range.</paragraph>
213 <paragraph xml-lang="en-US" id="hd_id3145264" role="heading" level="3" l10n="U"
214 oldref="55">Example</paragraph>
215 <paragraph xml-lang="en-US" id="par_id3159112" role="paragraph" l10n="U" oldref="56">
216 <item type="input">=INDEX(Prices;4;1)</item> returns the value from row 4 and column 1 of the database range defined in <emph>Data - Define</emph> as <emph>Prices</emph>.</paragraph>
217 <paragraph xml-lang="en-US" id="par_id3150691" role="paragraph" l10n="U" oldref="57">
218 <item type="input">=INDEX(SumX;4;1)</item> returns the value from the range <emph>SumX</emph> in row 4 and column 1 as defined in <emph>Insert - Names - Define</emph>.</paragraph>
219 <paragraph xml-lang="en-US" id="par_id4109012" role="paragraph" l10n="NEW">
220 <item type="input">=INDEX(A1:B6;1)</item> returns a reference to the first row of A1:B6.</paragraph>
221 <paragraph xml-lang="en-US" id="par_id9272133" role="paragraph" l10n="NEW">
222 <item type="input">=INDEX(A1:B6;0;1)</item> returns a reference to the first column of A1:B6.</paragraph>
223 <paragraph xml-lang="en-US" id="par_id3158419" role="paragraph" l10n="U" oldref="58">
224 <item type="input">=INDEX((multi);4;1)</item> indicates the value contained in row 4 and column 1 of the (multiple) range, which you named under <emph>Insert - Names - Set</emph> as <emph>multi</emph>. The multiple range may consist of several rectangular ranges, each with a row 4 and column 1. If you now want to call the second block of this multiple range enter the number <item type="input">2</item> as the <emph>range</emph> parameter.</paragraph>
225 <paragraph xml-lang="en-US" id="par_id3148595" role="paragraph" l10n="U" oldref="59">
226 <item type="input">=INDEX(A1:B6;1;1)</item> indicates the value in the upper-left of the A1:B6 range.</paragraph>
227 <paragraph xml-lang="en-US" id="par_id9960020" role="paragraph" l10n="NEW">
228 <item type="input">=INDEX((multi);0;0;2)</item> returns a reference to the second range of the multiple range.</paragraph>
229 </section>
230 <section id="Section6">
231 <bookmark xml-lang="en-US" branch="index" id="bm_id3153181"><bookmark_value>INDIRECT function</bookmark_value>
232 </bookmark>
233 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_INDIREKT" id="bm_id3153922" localize="false"/>
234 <paragraph xml-lang="en-US" id="hd_id3153181" role="heading" level="2" l10n="U"
235 oldref="62">INDIRECT</paragraph>
236 <paragraph xml-lang="en-US" id="par_id3147169" role="paragraph" l10n="U" oldref="63"><ahelp hid="HID_FUNC_INDIREKT">Returns the <emph>reference</emph> specified by a text string.</ahelp> This function can also be used to return the area of a corresponding string.</paragraph>
237 <embed href="text/scalc/01/04060109.xhp#r1c1"/>
238 <paragraph xml-lang="en-US" id="hd_id3153717" role="heading" level="3" l10n="U"
239 oldref="64">Syntax</paragraph>
240 <paragraph xml-lang="en-US" id="par_id3149824" role="code" l10n="U" oldref="65">INDIRECT(Ref; A1)</paragraph>
241 <paragraph xml-lang="en-US" id="par_id3154317" role="paragraph" l10n="U" oldref="66">
242 <emph>Ref</emph> represents a reference to a cell or an area (in text form) for which to return the contents.</paragraph>
243 <paragraph xml-lang="en-US" id="par_id1027200802470312" role="paragraph" l10n="NEW">
244 <emph>A1</emph> (optional) - if set to 0, the R1C1 notation is used. If this parameter is absent or set to another value than 0, the A1 notation is used.</paragraph>
245 <paragraph xml-lang="en-US" id="par_idN10CAE" role="note" l10n="NEW">If you open an Excel spreadsheet that uses indirect addresses calculated from string functions, the sheet addresses will not be translated automatically. For example, the Excel address in INDIRECT("filename!sheetname"&amp;B1) is not converted into the Calc address in INDIRECT("filename.sheetname"&amp;B1).<comment>UFI: for #i34465#</comment></paragraph>
246 <paragraph xml-lang="en-US" id="par_id7687917" role="note" l10n="NEW">INDIRECT cannot resolve range names as in INDIRECT("RangeName").<comment>i83070</comment></paragraph>
247 <paragraph xml-lang="en-US" id="hd_id3150389" role="heading" level="3" l10n="U"
248 oldref="67">Example</paragraph>
249 <paragraph xml-lang="en-US" id="par_id3150608" role="paragraph" l10n="U" oldref="68">
250 <item type="input">=INDIRECT(A1)</item> equals 100 if A1 contains C108 as a reference and cell C108 contains a value of <item type="input">100</item>.</paragraph>
251 <paragraph xml-lang="en-US" id="par_id3083286" role="paragraph" l10n="CHG" oldref="181">
252 <item type="input">=SUM(INDIRECT("a1:" &amp; ADDRESS(1;3)))</item> totals the cells in the area of A1 up to the cell with the address defined by row 1 and column 3. This means that area A1:C1 is totaled.</paragraph>
253 </section>
254 <section id="Section7">
255 <bookmark xml-lang="en-US" branch="index" id="bm_id3154818"><bookmark_value>COLUMN function</bookmark_value>
256 </bookmark>
257 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_SPALTE" id="bm_id3156378" localize="false"/>
258 <paragraph xml-lang="en-US" id="hd_id3154818" role="heading" level="2" l10n="U"
259 oldref="70">COLUMN</paragraph>
260 <paragraph xml-lang="en-US" id="par_id3149711" role="paragraph" l10n="U" oldref="193"><ahelp hid="HID_FUNC_SPALTE">Returns the column number of a cell reference.</ahelp> If the reference is a cell the column number of the cell is returned; if the parameter is a cell area, the corresponding column numbers are returned in a single-row <link href="text/scalc/01/04060107.xhp#wasmatrix" name="array">array</link> if the formula is entered <link href="text/scalc/01/04060107.xhp#somatrixformel" name="as an array formula">as an array formula</link>. If the COLUMN function with an area reference parameter is not used for an array formula, only the column number of the first cell within the area is determined.</paragraph>
261 <paragraph xml-lang="en-US" id="hd_id3149283" role="heading" level="3" l10n="U"
262 oldref="72">Syntax</paragraph>
263 <paragraph xml-lang="en-US" id="par_id3149447" role="code" l10n="U" oldref="73">COLUMN(Reference)</paragraph>
264 <paragraph xml-lang="en-US" id="par_id3156310" role="paragraph" l10n="U" oldref="74">
265 <emph>Reference</emph> is the reference to a cell or cell area whose first column number is to be found.</paragraph>
266 <paragraph xml-lang="en-US" id="par_id3155837" role="paragraph" l10n="U" oldref="194">If no reference is entered, the column number of the cell in which the formula is entered is found. <item type="productname">%PRODUCTNAME</item> Calc automatically sets the reference to the current cell.</paragraph>
267 <paragraph xml-lang="en-US" id="hd_id3152932" role="heading" level="3" l10n="U"
268 oldref="75">Example</paragraph>
269 <paragraph xml-lang="en-US" id="par_id3147571" role="paragraph" l10n="U" oldref="76">
270 <item type="input">=COLUMN(A1)</item> equals 1. Column A is the first column in the table.</paragraph>
271 <paragraph xml-lang="en-US" id="par_id3147079" role="paragraph" l10n="U" oldref="77">
272 <item type="input">=COLUMN(C3:E3)</item> equals 3. Column C is the third column in the table.</paragraph>
273 <paragraph xml-lang="en-US" id="par_id3146861" role="paragraph" l10n="U" oldref="195">
274 <item type="input">=COLUMN(D3:G10)</item> returns 4 because column D is the fourth column in the table and the COLUMN function is not used as an array formula. (In this case, the first value of the array is always used as the result.)</paragraph>
275 <paragraph xml-lang="en-US" id="par_id3156320" role="paragraph" l10n="U" oldref="196">
276 <item type="input">{=COLUMN(B2:B7)}</item> and <item type="input">=COLUMN(B2:B7)</item> both return 2 because the reference only contains column B as the second column in the table. Because single-column areas have only one column number, it does not make a difference whether or not the formula is used as an array formula.</paragraph>
277 <paragraph xml-lang="en-US" id="par_id3150872" role="paragraph" l10n="U" oldref="197">
278 <item type="input">=COLUMN()</item> returns 3 if the formula was entered in column C.</paragraph>
279 <paragraph xml-lang="en-US" id="par_id3153277" role="paragraph" l10n="U" oldref="198">
280 <item type="input">{=COLUMN(Rabbit)}</item> returns the single-row array (3, 4) if "Rabbit" is the named area (C1:D3).</paragraph>
281 </section>
282 <section id="Section8">
283 <bookmark xml-lang="en-US" branch="index" id="bm_id3154643"><bookmark_value>COLUMNS function</bookmark_value>
284 </bookmark>
285 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_SPALTEN" id="bm_id3156134" localize="false"/>
286 <paragraph xml-lang="en-US" id="hd_id3154643" role="heading" level="2" l10n="U"
287 oldref="79">COLUMNS</paragraph>
288 <paragraph xml-lang="en-US" id="par_id3151182" role="paragraph" l10n="U" oldref="80"><ahelp hid="HID_FUNC_SPALTEN">Returns the number of columns in the given reference.</ahelp></paragraph>
289 <paragraph xml-lang="en-US" id="hd_id3149141" role="heading" level="3" l10n="U"
290 oldref="81">Syntax</paragraph>
291 <paragraph xml-lang="en-US" id="par_id3154047" role="code" l10n="U" oldref="82">COLUMNS(Array)</paragraph>
292 <paragraph xml-lang="en-US" id="par_id3154745" role="paragraph" l10n="U" oldref="83">
293 <emph>Array</emph> is the reference to a cell range whose total number of columns is to be found. The argument can also be a single cell.</paragraph>
294 <paragraph xml-lang="en-US" id="hd_id3153622" role="heading" level="3" l10n="U"
295 oldref="84">Example</paragraph>
296 <paragraph xml-lang="en-US" id="par_id3149577" role="paragraph" l10n="U" oldref="200">
297 <item type="input">=COLUMNS(B5)</item> returns 1 because a cell only contains one column.</paragraph>
298 <paragraph xml-lang="en-US" id="par_id3145649" role="paragraph" l10n="U" oldref="85">
299 <item type="input">=COLUMNS(A1:C5)</item> equals 3. The reference comprises three columns.</paragraph>
300 <paragraph xml-lang="en-US" id="par_id3155846" role="paragraph" l10n="U" oldref="201">
301 <item type="input">=COLUMNS(Rabbit)</item> returns 2 if <item type="literal">Rabbit</item> is the named range (C1:D3).</paragraph>
302 </section>
303 <section id="Section9">
304 <bookmark xml-lang="en-US" branch="index" id="bm_id3153152"><bookmark_value>vertical search function</bookmark_value>
305 <bookmark_value>VLOOKUP function</bookmark_value>
306 </bookmark>
307 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_SVERWEIS" id="bm_id3152809" localize="false"/>
308 <paragraph xml-lang="en-US" id="hd_id3153152" role="heading" level="2" l10n="U"
309 oldref="87">VLOOKUP</paragraph>
310 <paragraph xml-lang="en-US" id="par_id3149984" role="paragraph" l10n="CHG" oldref="88"><ahelp hid="HID_FUNC_SVERWEIS">Vertical search with reference to adjacent cells to the right.</ahelp> This function checks if a specific value is contained in the first column of an array. The function then returns the value in the same row of the column named by <item type="literal">Index</item>. If the <item type="literal">SortOrder</item> parameter is omitted or set to TRUE or one, it is assumed that the data is sorted in ascending order. In this case, if the exact <item type="literal">SearchCriterion</item> is not found, the last value that is smaller than the criterion will be returned. If <item type="literal">SortOrder</item> is set to FALSE or zero, an exact match must be found, otherwise the error <emph>Error: Value Not Available</emph> will be the result. Thus with a value of zero the data does not need to be sorted in ascending order.</paragraph>
311 <embed href="text/shared/00/00000001.xhp#regulaer"/>
312 <paragraph xml-lang="en-US" id="hd_id3146898" role="heading" level="3" l10n="U"
313 oldref="89">Syntax</paragraph>
314 <paragraph xml-lang="en-US" id="par_id3150156" role="code" l10n="U" oldref="90">=VLOOKUP(SearchCriterion; Array; Index; SortOrder)</paragraph>
315 <paragraph xml-lang="en-US" id="par_id3149289" role="paragraph" l10n="U" oldref="91">
316 <emph>SearchCriterion</emph> is the value searched for in the first column of the array.</paragraph>
317 <paragraph xml-lang="en-US" id="par_id3153884" role="paragraph" l10n="U" oldref="92">
318 <emph>Array</emph> is the reference, which is to comprise at least two columns.</paragraph>
319 <paragraph xml-lang="en-US" id="par_id3156005" role="paragraph" l10n="U" oldref="93">
320 <emph>Index</emph> is the number of the column in the array that contains the value to be returned. The first column has the number 1.</paragraph>
321 <paragraph xml-lang="en-US" id="par_id3151208" role="paragraph" l10n="U" oldref="94">
322 <emph>SortOrder</emph> is an optional parameter that indicates whether the first column in the array is sorted in ascending order. Enter the Boolean value FALSE or zero if the first column is not sorted in ascending order. Sorted columns can be searched much faster and the function always returns a value, even if the search value was not matched exactly, if it is between the lowest and highest value of the sorted list. In unsorted lists, the search value must be matched exactly. Otherwise the function will return this message: <emph>Error: Value Not Available</emph>.</paragraph>
323 <embed href="text/scalc/05/empty_cells.xhp#empty_cells"/>
324 <paragraph xml-lang="en-US" id="hd_id3147487" role="heading" level="3" l10n="U"
325 oldref="95">Example</paragraph>
326 <paragraph xml-lang="en-US" id="par_id3154129" role="paragraph" l10n="U" oldref="96">You want to enter the number of a dish on the menu in cell A1, and the name of the dish is to appear as text in the neighboring cell (B1) immediately. The Number to Name assignment is contained in the D1:E100 array. D1 contains <item type="input">100</item>, E1 contains the name <item type="input">Vegetable Soup</item>, and so forth, for 100 menu items. The numbers in column D are sorted in ascending order; thus, the optional <item type="literal">SortOrder</item> parameter is not necessary.</paragraph>
327 <paragraph xml-lang="en-US" id="par_id3145663" role="paragraph" l10n="U" oldref="97">Enter the following formula in B1:</paragraph>
328 <paragraph xml-lang="en-US" id="par_id3151172" role="paragraph" l10n="U" oldref="98">
329 <item type="input">=VLOOKUP(A1;D1:E100;2)</item>
330 </paragraph>
331 <paragraph xml-lang="en-US" id="par_id3149200" role="paragraph" l10n="U" oldref="99">As soon as you enter a number in A1 B1 will show the corresponding text contained in the second column of reference D1:E100. Entering a nonexistent number displays the text with the next number down. To prevent this, enter FALSE as the last parameter in the formula so that an error message is generated when a nonexistent number is entered.</paragraph>
332 </section>
333 <section id="Section10">
334 <bookmark xml-lang="en-US" branch="index" id="bm_id3153905"><bookmark_value>sheet numbers; looking up</bookmark_value>
335 <bookmark_value>SHEET function</bookmark_value>
336 </bookmark>
337 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_TABELLE" id="bm_id3154693" localize="false"/>
338 <paragraph xml-lang="en-US" id="hd_id3153905" role="heading" level="2" l10n="U"
339 oldref="215">SHEET</paragraph>
340 <paragraph xml-lang="en-US" id="par_id3150309" role="paragraph" l10n="U" oldref="216"><ahelp hid="HID_FUNC_TABELLE">Returns the sheet number of a reference or a string representing a sheet name.</ahelp> If you do not enter any parameters, the result is the sheet number of the spreadsheet containing the formula.</paragraph>
341 <paragraph xml-lang="en-US" id="hd_id3148564" role="heading" level="3" l10n="U"
342 oldref="217">Syntax</paragraph>
343 <paragraph xml-lang="en-US" id="par_id3153095" role="code" l10n="U" oldref="218">SHEET(Reference)</paragraph>
344 <paragraph xml-lang="en-US" id="par_id3154588" role="paragraph" l10n="U" oldref="219">
345 <emph>Reference</emph> is optional and is the reference to a cell, an area, or a sheet name string.</paragraph>
346 <paragraph xml-lang="en-US" id="hd_id3155399" role="heading" level="3" l10n="U"
347 oldref="220">Example</paragraph>
348 <paragraph xml-lang="en-US" id="par_id3146988" role="paragraph" l10n="U" oldref="221">
349 <item type="input">=SHEET(Sheet2.A1)</item> returns 2 if Sheet2 is the second sheet in the spreadsheet document.</paragraph>
350 </section>
351 <section id="Section11">
352 <bookmark xml-lang="en-US" branch="index" id="bm_id3148829"><bookmark_value>number of sheets; function</bookmark_value>
353 <bookmark_value>SHEETS function</bookmark_value>
354 </bookmark>
355 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_TABELLEN" id="bm_id3150524" localize="false"/>
356 <paragraph xml-lang="en-US" id="hd_id3148829" role="heading" level="2" l10n="U"
357 oldref="222">SHEETS</paragraph>
358 <paragraph xml-lang="en-US" id="par_id3148820" role="paragraph" l10n="U" oldref="223"><ahelp hid="HID_FUNC_TABELLEN">Determines the number of sheets in a reference.</ahelp> If you do not enter any parameters, it returns the number of sheets in the current document.</paragraph>
359 <paragraph xml-lang="en-US" id="hd_id3154220" role="heading" level="3" l10n="U"
360 oldref="224">Syntax</paragraph>
361 <paragraph xml-lang="en-US" id="par_id3150777" role="code" l10n="U" oldref="225">SHEETS(Reference)</paragraph>
362 <paragraph xml-lang="en-US" id="par_id3153060" role="paragraph" l10n="U" oldref="226">
363 <emph>Reference</emph> is the reference to a sheet or an area. This parameter is optional.</paragraph>
364 <paragraph xml-lang="en-US" id="hd_id3149766" role="heading" level="3" l10n="U"
365 oldref="227">Example</paragraph>
366 <paragraph xml-lang="en-US" id="par_id3150507" role="paragraph" l10n="U" oldref="228">
367 <item type="input">=SHEETS(Sheet1.A1:Sheet3.G12)</item> returns 3 if Sheet1, Sheet2, and Sheet3 exist in the sequence indicated.</paragraph>
368 </section>
369 <section id="Section12">
370 <bookmark xml-lang="en-US" branch="index" id="bm_id3158407"><bookmark_value>MATCH function</bookmark_value>
371 </bookmark>
372 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_VERGLEICH" id="bm_id3154210" localize="false"/>
373 <paragraph xml-lang="en-US" id="hd_id3158407" role="heading" level="2" l10n="U"
374 oldref="101">MATCH</paragraph>
375 <paragraph xml-lang="en-US" id="par_id3154896" role="paragraph" l10n="U" oldref="102"><ahelp hid="HID_FUNC_VERGLEICH">Returns the relative position of an item in an array that matches a specified value.</ahelp> The function returns the position of the value found in the lookup_array as a number.</paragraph>
376 <paragraph xml-lang="en-US" id="hd_id3153834" role="heading" level="3" l10n="U"
377 oldref="103">Syntax</paragraph>
378 <paragraph xml-lang="en-US" id="par_id3159152" role="code" l10n="U" oldref="104">MATCH(SearchCriterion; LookupArray; Type)</paragraph>
379 <paragraph xml-lang="en-US" id="par_id3149336" role="paragraph" l10n="U" oldref="105">
380 <emph>SearchCriterion</emph> is the value which is to be searched for in the single-row or single-column array.</paragraph>
381 <paragraph xml-lang="en-US" id="par_id3159167" role="paragraph" l10n="U" oldref="106">
382 <emph>LookupArray</emph> is the reference searched. A lookup array can be a single row or column, or part of a single row or column.</paragraph>
383 <paragraph xml-lang="en-US" id="par_id3147239" role="paragraph" l10n="U" oldref="107">
384 <emph>Type</emph> may take the values 1, 0, or -1. If Type = 1 or if this optional parameter is missing, it is assumed that the first column of the search array is sorted in ascending order. If Type = -1 it is assumed that the column in sorted in descending order. This corresponds to the same function in Microsoft Excel.</paragraph>
385 <paragraph xml-lang="en-US" id="par_id3154265" role="paragraph" l10n="CHG" oldref="231">If Type = 0, only exact matches are found. If the search criterion is found more than once, the function returns the index of the first matching value. Only if Type = 0 can you search for regular expressions.</paragraph>
386 <paragraph xml-lang="en-US" id="par_id3147528" role="paragraph" l10n="CHG" oldref="232">If Type = 1 or the third parameter is missing, the index of the last value that is smaller or equal to the search criterion is returned. This applies even when the search array is not sorted. For Type = -1, the first value that is larger or equal is returned.</paragraph>
387 <embed href="text/shared/00/00000001.xhp#regulaer"/>
388 <paragraph xml-lang="en-US" id="hd_id3155119" role="heading" level="3" l10n="U"
389 oldref="108">Example</paragraph>
390 <paragraph xml-lang="en-US" id="par_id3155343" role="paragraph" l10n="U" oldref="109">
391 <item type="input">=MATCH(200;D1:D100)</item> searches the area D1:D100, which is sorted by column D, for the value 200. As soon as this value is reached, the number of the row in which it was found is returned. If a higher value is found during the search in the column, the number of the previous row is returned.</paragraph>
392 </section>
393 <section id="Section13">
394 <bookmark xml-lang="en-US" branch="index" id="bm_id3158430"><bookmark_value>OFFSET function</bookmark_value>
395 </bookmark>
396 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_VERSCHIEBUNG" id="bm_id3148926" localize="false"/>
397 <paragraph xml-lang="en-US" id="hd_id3158430" role="heading" level="2" l10n="U"
398 oldref="111">OFFSET</paragraph>
399 <paragraph xml-lang="en-US" id="par_id3149167" role="paragraph" l10n="U" oldref="112"><ahelp hid="HID_FUNC_VERSCHIEBUNG">Returns the value of a cell offset by a certain number of rows and columns from a given reference point.</ahelp></paragraph>
400 <paragraph xml-lang="en-US" id="hd_id3146952" role="heading" level="3" l10n="U"
401 oldref="113">Syntax</paragraph>
402 <paragraph xml-lang="en-US" id="par_id3159194" role="code" l10n="U" oldref="114">OFFSET(Reference; Rows; Columns; Height; Width)</paragraph>
403 <paragraph xml-lang="en-US" id="par_id3152360" role="paragraph" l10n="CHG" oldref="115">
404 <emph>Reference</emph> is the reference from which the function searches for the new reference.</paragraph>
405 <paragraph xml-lang="en-US" id="par_id3156032" role="paragraph" l10n="CHG" oldref="116">
406 <emph>Rows</emph> is the number of rows by which the reference was corrected up (negative value) or down.</paragraph>
407 <paragraph xml-lang="en-US" id="par_id3166458" role="paragraph" l10n="CHG" oldref="117">
408 <emph>Columns</emph> (optional) is the number of columns by which the reference was corrected to the left (negative value) or to the right.</paragraph>
409 <paragraph xml-lang="en-US" id="par_id3150708" role="paragraph" l10n="CHG" oldref="118">
410 <emph>Height</emph> (optional) is the vertical height for an area that starts at the new reference position.</paragraph>
411 <paragraph xml-lang="en-US" id="par_id3147278" role="paragraph" l10n="CHG" oldref="119">
412 <emph>Width</emph> (optional) is the horizontal width for an area that starts at the new reference position.</paragraph>
413 <paragraph xml-lang="en-US" id="par_id8662373" role="paragraph" l10n="NEW">Arguments <emph>Rows</emph> and <emph>Columns</emph> must not lead to zero or negative start row or column</paragraph>
414 <paragraph xml-lang="en-US" id="par_id9051484" role="paragraph" l10n="NEW">Arguments <emph>Height</emph> and <emph>Width</emph> must not lead to zero or negative count of rows or columns.</paragraph>
415 <paragraph xml-lang="en-US" id="par_idN1104B" role="paragraph" l10n="NEW">
416 <embedvar href="text/scalc/00/00000004.xhp#optional"/>
417 </paragraph>
418 <paragraph xml-lang="en-US" id="hd_id3155586" role="heading" level="3" l10n="U"
419 oldref="120">Example</paragraph>
420 <paragraph xml-lang="en-US" id="par_id3149744" role="paragraph" l10n="CHG" oldref="121">
421 <item type="input">=OFFSET(A1;2;2)</item> returns the value in cell C3 (A1 moved by two rows and two columns down). If C3 contains the value <item type="input">100</item> this function returns the value 100.</paragraph>
422 <paragraph xml-lang="en-US" id="par_id7439802" role="paragraph" l10n="NEW">
423 <item type="input">=OFFSET(B2:C3;1;1)</item> returns a reference to B2:C3 moved down by 1 row and one column to the right (C3:D4).</paragraph>
424 <paragraph xml-lang="en-US" id="par_id3009430" role="paragraph" l10n="NEW">
425 <item type="input">=OFFSET(B2:C3;-1;-1)</item> returns a reference to B2:C3 moved up by 1 row and one column to the left (A1:B2).</paragraph>
426 <paragraph xml-lang="en-US" id="par_id2629169" role="paragraph" l10n="NEW">
427 <item type="input">=OFFSET(B2:C3;0;0;3;4)</item> returns a reference to B2:C3 resized to 3 rows and 4 columns (B2:E4).</paragraph>
428 <paragraph xml-lang="en-US" id="par_id6668599" role="paragraph" l10n="NEW">
429 <item type="input">=OFFSET(B2:C3;1;0;3;4)</item> returns a reference to B2:C3 moved down by one row resized to 3 rows and 4 columns (B2:E4).</paragraph>
430 <paragraph xml-lang="en-US" id="par_id3153739" role="paragraph" l10n="U" oldref="122">
431 <item type="input">=SUM(OFFSET(A1;2;2;5;6))</item> determines the total of the area that starts in cell C3 and has a height of 5 rows and a width of 6 columns (area=C3:H7).</paragraph>
432 </section>
433 <section id="Section14">
434 <bookmark xml-lang="en-US" branch="index" id="bm_id3159273"><bookmark_value>LOOKUP function</bookmark_value>
435 </bookmark>
436 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_VERWEIS" id="bm_id3152877" localize="false"/>
437 <paragraph xml-lang="en-US" id="hd_id3159273" role="heading" level="2" l10n="U"
438 oldref="123">LOOKUP</paragraph>
439 <paragraph xml-lang="en-US" id="par_id3153389" role="paragraph" l10n="CHG" oldref="124"><ahelp hid="HID_FUNC_VERWEIS">Returns the contents of a cell either from a one-row or one-column range.</ahelp> Optionally, the assigned value (of the same index) is returned in a different column and row. As opposed to <link href="text/scalc/01/04060109.xhp" name="VLOOKUP">VLOOKUP</link> and <link href="text/scalc/01/04060109.xhp" name="HLOOKUP">HLOOKUP</link>, search and result vector may be at different positions; they do not have to be adjacent. Additionally, the search vector for the LOOKUP must be sorted ascending, otherwise the search will not return any usable results.</paragraph>
440 <paragraph xml-lang="en-US" id="par_id4484084" role="note" l10n="NEW">If LOOKUP cannot find the search criterion, it matches the largest value in the search vector that is less than or equal to the search criterion.</paragraph>
441 <embed href="text/shared/00/00000001.xhp#regulaer"/>
442 <paragraph xml-lang="en-US" id="hd_id3152947" role="heading" level="3" l10n="U"
443 oldref="125">Syntax</paragraph>
444 <paragraph xml-lang="en-US" id="par_id3154104" role="code" l10n="U" oldref="126">LOOKUP(SearchCriterion; SearchVector; ResultVector)</paragraph>
445 <paragraph xml-lang="en-US" id="par_id3150646" role="paragraph" l10n="U" oldref="127">
446 <emph>SearchCriterion</emph> is the value to be searched for; entered either directly or as a reference.</paragraph>
447 <paragraph xml-lang="en-US" id="par_id3154854" role="paragraph" l10n="U" oldref="128">
448 <emph>SearchVector</emph> is the single-row or single-column area to be searched.</paragraph>
449 <paragraph xml-lang="en-US" id="par_id3149925" role="paragraph" l10n="U" oldref="129">
450 <emph>ResultVector</emph> is another single-row or single-column range from which the result of the function is taken. The result is the cell of the result vector with the same index as the instance found in the search vector.</paragraph>
451 <embed href="text/scalc/05/empty_cells.xhp#empty_cells"/>
452 <paragraph xml-lang="en-US" id="hd_id3148624" role="heading" level="3" l10n="U"
453 oldref="130">Example</paragraph>
454 <paragraph xml-lang="en-US" id="par_id3149809" role="paragraph" l10n="U" oldref="131">
455 <item type="input">=LOOKUP(A1;D1:D100;F1:F100)</item> searches the corresponding cell in range D1:D100 for the number you entered in A1. For the instance found, the index is determined, for example, the 12th cell in this range. Then, the contents of the 12th cell are returned as the value of the function (in the result vector).</paragraph>
456 </section>
457 <section id="Section15">
458 <bookmark xml-lang="en-US" branch="index" id="bm_id3149425"><bookmark_value>STYLE function</bookmark_value>
459 </bookmark>
460 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_VORLAGE" id="bm_id3154342" localize="false"/>
461 <paragraph xml-lang="en-US" id="hd_id3149425" role="heading" level="2" l10n="U"
462 oldref="133">STYLE</paragraph>
463 <paragraph xml-lang="en-US" id="par_id3150826" role="paragraph" l10n="U" oldref="134"><ahelp hid="HID_FUNC_VORLAGE">Applies a style to the cell containing the formula.</ahelp> After a set amount of time, another style can be applied. This function always returns the value 0, allowing you to add it to another function without changing the value. Together with the CURRENT function you can apply a color to a cell regardless of the value. For example: =...+STYLE(IF(CURRENT()&gt;3;"red";"green")) applies the style "red" to the cell if the value is greater than 3, otherwise the style "green" is applied. Both cell formats have to be defined beforehand.</paragraph>
464 <paragraph xml-lang="en-US" id="hd_id3145373" role="heading" level="3" l10n="U"
465 oldref="135">Syntax</paragraph>
466 <paragraph xml-lang="en-US" id="par_id3149302" role="code" l10n="U" oldref="136">STYLE("Style"; Time; "Style2")</paragraph>
467 <paragraph xml-lang="en-US" id="par_id3150596" role="paragraph" l10n="U" oldref="137">
468 <emph>Style</emph> is the name of a cell style assigned to the cell. Style names must be entered in quotation marks.</paragraph>
469 <paragraph xml-lang="en-US" id="par_id3156149" role="paragraph" l10n="U" oldref="138">
470 <emph>Time</emph> is an optional time range in seconds. If this parameter is missing the style will not be changed after a certain amount of time has passed.</paragraph>
471 <paragraph xml-lang="en-US" id="par_id3149520" role="paragraph" l10n="U" oldref="139">
472 <emph>Style2</emph> is the optional name of a cell style assigned to the cell after a certain amount of time has passed. If this parameter is missing "Default" is assumed.</paragraph>
473 <paragraph xml-lang="en-US" id="par_idN111CA" role="paragraph" l10n="NEW">
474 <embedvar href="text/scalc/00/00000004.xhp#optional"/>
475 </paragraph>
476 <paragraph xml-lang="en-US" id="hd_id3159254" role="heading" level="3" l10n="U"
477 oldref="140">Example</paragraph>
478 <paragraph xml-lang="en-US" id="par_id3151374" role="paragraph" l10n="U" oldref="141">
479 <item type="input">=STYLE("Invisible";60;"Default")</item> formats the cell in transparent format for 60 seconds after the document was recalculated or loaded, then the Default format is assigned. Both cell formats have to be defined beforehand.</paragraph>
480 <paragraph xml-lang="en-US" id="par_id8056886" role="paragraph" l10n="NEW">Since STYLE() has a numeric return value of zero, this return value gets appended to a string. This can be avoided using T() as in the following example </paragraph>
481 <paragraph xml-lang="en-US" id="par_id3668935" role="paragraph" l10n="NEW">
482 <item type="input">="Text"&amp;T(STYLE("myStyle"))</item>
483 </paragraph>
484 <paragraph xml-lang="en-US" id="par_id3042085" role="paragraph" l10n="NEW">See also CURRENT() for another example.</paragraph>
485 </section>
486 <section id="Section16">
487 <bookmark xml-lang="en-US" branch="index" id="bm_id3150430"><bookmark_value>CHOOSE function</bookmark_value>
488 </bookmark>
489 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_WAHL" id="bm_id3153947" localize="false"/>
490 <paragraph xml-lang="en-US" id="hd_id3150430" role="heading" level="2" l10n="U"
491 oldref="142">CHOOSE</paragraph>
492 <paragraph xml-lang="en-US" id="par_id3143270" role="paragraph" l10n="U" oldref="143"><ahelp hid="HID_FUNC_WAHL">Uses an index to return a value from a list of up to 30 values.</ahelp></paragraph>
493 <paragraph xml-lang="en-US" id="hd_id3153533" role="heading" level="3" l10n="U"
494 oldref="144">Syntax</paragraph>
495 <paragraph xml-lang="en-US" id="par_id3155425" role="code" l10n="U" oldref="145">CHOOSE(Index; Value1; ...; Value30)</paragraph>
496 <paragraph xml-lang="en-US" id="par_id3144755" role="paragraph" l10n="U" oldref="146">
497 <emph>Index</emph> is a reference or number between 1 and 30 indicating which value is to be taken from the list.</paragraph>
498 <paragraph xml-lang="en-US" id="par_id3149939" role="paragraph" l10n="U" oldref="147">
499 <emph>Value1...Value30</emph> is the list of values entered as a reference to a cell or as individual values.</paragraph>
500 <paragraph xml-lang="en-US" id="hd_id3151253" role="heading" level="3" l10n="U"
501 oldref="148">Example</paragraph>
502 <paragraph xml-lang="en-US" id="par_id3150625" role="paragraph" l10n="U" oldref="149">
503 <item type="input">=CHOOSE(A1;B1;B2;B3;"Today";"Yesterday";"Tomorrow")</item>, for example, returns the contents of cell B2 for A1 = 2; for A1 = 4, the function returns the text "Today".</paragraph>
504 </section>
505 <section id="Section17">
506 <bookmark xml-lang="en-US" branch="index" id="bm_id3151001"><bookmark_value>HLOOKUP function</bookmark_value>
507 </bookmark>
508 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_WVERWEIS" id="bm_id3149481" localize="false"/>
509 <paragraph xml-lang="en-US" id="hd_id3151001" role="heading" level="2" l10n="U"
510 oldref="151">HLOOKUP</paragraph>
511 <paragraph xml-lang="en-US" id="par_id3148688" role="paragraph" l10n="U" oldref="152"><ahelp hid="HID_FUNC_WVERWEIS">Searches for a value and reference to the cells below the selected area.</ahelp> This function verifies if the first row of an array contains a certain value. The function returns then the value in a row of the array, named in the <emph>Index</emph>, in the same column.</paragraph>
512 <embed href="text/shared/00/00000001.xhp#regulaer"/>
513 <paragraph xml-lang="en-US" id="hd_id3154661" role="heading" level="3" l10n="U"
514 oldref="153">Syntax</paragraph>
515 <paragraph xml-lang="en-US" id="par_id3146070" role="code" l10n="U" oldref="154">HLOOKUP(SearchCriteria; Array; Index; Sorted)</paragraph>
516 <paragraph xml-lang="en-US" id="par_id3148672" role="paragraph" l10n="U" oldref="155">See also:<link href="text/scalc/01/04060109.xhp" name="VLOOKUP">VLOOKUP</link> (columns and rows are exchanged)</paragraph>
517 <embed href="text/scalc/05/empty_cells.xhp#empty_cells"/>
518 </section>
519 <section id="Section18">
520 <bookmark xml-lang="en-US" branch="index" id="bm_id3147321"><bookmark_value>ROW function</bookmark_value>
521 </bookmark>
522 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_ZEILE" id="bm_id3147333" localize="false"/>
523 <paragraph xml-lang="en-US" id="hd_id3147321" role="heading" level="2" l10n="U"
524 oldref="157">ROW</paragraph>
525 <paragraph xml-lang="en-US" id="par_id3154564" role="paragraph" l10n="U" oldref="203"><ahelp hid="HID_FUNC_ZEILE">Returns the row number of a cell reference.</ahelp> If the reference is a cell, it returns the row number of the cell. If the reference is a cell range, it returns the corresponding row numbers in a one-column <link href="text/scalc/01/04060107.xhp#wasmatrix" name="Array">Array</link> if the formula is entered <link href="text/scalc/01/04060107.xhp#somatrixformel" name="as an array formula">as an array formula</link>. If the ROW function with a range reference is not used in an array formula, only the row number of the first range cell will be returned.</paragraph>
526 <paragraph xml-lang="en-US" id="hd_id3158439" role="heading" level="3" l10n="U"
527 oldref="159">Syntax</paragraph>
528 <paragraph xml-lang="en-US" id="par_id3154916" role="code" l10n="U" oldref="160">ROW(Reference)</paragraph>
529 <paragraph xml-lang="en-US" id="par_id3156336" role="paragraph" l10n="U" oldref="161">
530 <emph>Reference</emph> is a cell, an area, or the name of an area.</paragraph>
531 <paragraph xml-lang="en-US" id="par_id3151109" role="paragraph" l10n="U" oldref="204">If you do not indicate a reference, the row number of the cell in which the formula is entered will be found. <item type="productname">%PRODUCTNAME</item> Calc automatically sets the reference to the current cell.</paragraph>
532 <paragraph xml-lang="en-US" id="hd_id3155609" role="heading" level="3" l10n="U"
533 oldref="162">Example</paragraph>
534 <paragraph xml-lang="en-US" id="par_id3154830" role="paragraph" l10n="U" oldref="205">
535 <item type="input">=ROW(B3)</item> returns 3 because the reference refers to the third row in the table.</paragraph>
536 <paragraph xml-lang="en-US" id="par_id3147094" role="paragraph" l10n="U" oldref="206">
537 <item type="input">{=ROW(D5:D8)}</item> returns the single-column array (5, 6, 7, 8) because the reference specified contains rows 5 through 8.</paragraph>
538 <paragraph xml-lang="en-US" id="par_id3153701" role="paragraph" l10n="U" oldref="207">
539 <item type="input">=ROW(D5:D8)</item> returns 5 because the ROW function is not used as array formula and only the number of the first row of the reference is returned.</paragraph>
540 <paragraph xml-lang="en-US" id="par_id3150996" role="paragraph" l10n="U" oldref="208">
541 <item type="input">{=ROW(A1:E1)}</item> and <item type="input">=ROW(A1:E1)</item> both return 1 because the reference only contains row 1 as the first row in the table. (Because single-row areas only have one row number it does not make any difference whether or not the formula is used as an array formula.)</paragraph>
542 <paragraph xml-lang="en-US" id="par_id3153671" role="paragraph" l10n="U" oldref="209">
543 <item type="input">=ROW()</item> returns 3 if the formula was entered in row 3.</paragraph>
544 <paragraph xml-lang="en-US" id="par_id3153790" role="paragraph" l10n="U" oldref="210">
545 <item type="input">{=ROW(Rabbit)}</item> returns the single-column array (1, 2, 3) if "Rabbit" is the named area (C1:D3).</paragraph>
546 </section>
547 <section id="Section19">
548 <bookmark xml-lang="en-US" branch="index" id="bm_id3145772"><bookmark_value>ROWS function</bookmark_value>
549 </bookmark>
550 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_ZEILEN" id="bm_id3150667" localize="false"/>
551 <paragraph xml-lang="en-US" id="hd_id3145772" role="heading" level="2" l10n="U"
552 oldref="166">ROWS</paragraph>
553 <paragraph xml-lang="en-US" id="par_id3148971" role="paragraph" l10n="U" oldref="167"><ahelp hid="HID_FUNC_ZEILEN">Returns the number of rows in a reference or array.</ahelp></paragraph>
554 <paragraph xml-lang="en-US" id="hd_id3156051" role="heading" level="3" l10n="U"
555 oldref="168">Syntax</paragraph>
556 <paragraph xml-lang="en-US" id="par_id3154357" role="code" l10n="U" oldref="169">ROWS(Array)</paragraph>
557 <paragraph xml-lang="en-US" id="par_id3155942" role="paragraph" l10n="U" oldref="170">
558 <emph>Array</emph> is the reference or named area whose total number of rows is to be determined.</paragraph>
559 <paragraph xml-lang="en-US" id="hd_id3155869" role="heading" level="3" l10n="U"
560 oldref="171">Example</paragraph>
561 <paragraph xml-lang="en-US" id="par_id3154725" role="paragraph" l10n="U" oldref="212">
562 <item type="input">=Rows(B5)</item> returns 1 because a cell only contains one row.</paragraph>
563 <paragraph xml-lang="en-US" id="par_id3150102" role="paragraph" l10n="U" oldref="172">
564 <item type="input">=ROWS(A10:B12)</item> returns 3.</paragraph>
565 <paragraph xml-lang="en-US" id="par_id3155143" role="paragraph" l10n="U" oldref="213">
566 <item type="input">=ROWS(Rabbit)</item> returns 3 if "Rabbit" is the named area (C1:D3).</paragraph>
567 </section>
568 <section id="Section20">
569 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_HYPERLINK" id="bm_id8036439" localize="false"/>
570 <bookmark xml-lang="en-US" branch="index" id="bm_id9959410"><bookmark_value>HYPERLINK function</bookmark_value>
571 </bookmark>
572 <paragraph xml-lang="en-US" id="par_idN11798" role="heading" level="2" l10n="NEW">HYPERLINK</paragraph>
573 <paragraph xml-lang="en-US" id="par_idN117F1" role="paragraph" l10n="NEW"><ahelp hid="HID_FUNC_HYPERLINK">When you click a cell that contains the HYPERLINK function, the hyperlink opens.</ahelp></paragraph>
574 <paragraph xml-lang="en-US" id="par_idN11800" role="paragraph" l10n="NEW">If you use the optional <emph>CellText</emph> parameter, the formula locates the URL, and then displays the text or number.</paragraph>
575 <paragraph xml-lang="en-US" id="par_idN11803" role="tip" l10n="NEW">To open a hyperlinked cell with the keyboard, select the cell, press F2 to enter the Edit mode, move the cursor in front of the hyperlink, press Shift+F10, and then choose <emph>Open Hyperlink</emph>.</paragraph>
576 <paragraph xml-lang="en-US" id="par_idN1180A" role="heading" level="3" l10n="NEW">Syntax</paragraph>
577 <paragraph xml-lang="en-US" id="par_idN1180E" role="code" l10n="NEW">HYPERLINK("URL") or HYPERLINK("URL"; "CellText")</paragraph>
578 <paragraph xml-lang="en-US" id="par_idN11811" role="paragraph" l10n="CHG">
579 <emph>URL</emph> specifies the link target. The optional <emph>CellText</emph> parameter is the text or a number that is displayed in the cell and will be returned as the result. If the <emph>CellText</emph> parameter is not specified, the <emph>URL</emph> is displayed in the cell text and will be returned as the result.</paragraph>
580 <paragraph xml-lang="en-US" id="par_id0907200912224576" role="paragraph" l10n="NEW">The number 0 is returned for empty cells and matrix elements.</paragraph>
581 <paragraph xml-lang="en-US" id="par_idN11823" role="heading" level="3" l10n="NEW">Example</paragraph>
582 <paragraph xml-lang="en-US" id="par_idN11827" role="paragraph" l10n="NEW">
583 <item type="input">=HYPERLINK("http://www.example.org")</item> displays the text "http://www.example.org" in the cell and executes the hyperlink http://www.example.org when clicked.</paragraph>
584 <paragraph xml-lang="en-US" id="par_idN1182A" role="paragraph" l10n="NEW">
585 <item type="input">=HYPERLINK("http://www.example.org";"Click here")</item> displays the text "Click here" in the cell and executes the hyperlink http://www.example.org when clicked.</paragraph>
586 <paragraph xml-lang="en-US" id="par_id0907200912224534" role="paragraph" l10n="NEW">=HYPERLINK("http://www.example.org";12345) displays the number 12345 and executes the hyperlink http://www.example.org when clicked.</paragraph>
587 <paragraph xml-lang="en-US" id="par_idN1182D" role="paragraph" l10n="NEW">
588 <item type="input">=HYPERLINK($B4)</item> where cell B4 contains <item type="input">http://www.example.org</item>. The function adds http://www.example.org to the URL of the hyperlink cell and returns the same text which is used as formula result.</paragraph>
589 <paragraph xml-lang="en-US" id="par_idN11830" role="paragraph" l10n="NEW">
590 <item type="input">=HYPERLINK("http://www.";"Click ") &amp; "example.org"</item> displays the text Click example.org in the cell and executes the hyperlink http://www.example.org when clicked.</paragraph>
591 <paragraph xml-lang="en-US" id="par_id8859523" role="paragraph" l10n="NEW">
592 <item type="input">=HYPERLINK("#Sheet1.A1";"Go to top")</item> displays the text Go to top and jumps to cell Sheet1.A1 in this document.</paragraph>
593 <paragraph xml-lang="en-US" id="par_id2958769" role="paragraph" l10n="NEW">
594 <item type="input">=HYPERLINK("file:///C:/writer.odt#Specification";"Go to Writer bookmark")</item>displays the text Go to Writer bookmark, loads the specified text document and jumps to bookmark "Specification".</paragraph>
595 </section>
596 <section id="getpivotdata">
597 <bookmark xml-lang="en-US" branch="index" id="bm_id7682424"><bookmark_value>GETPIVOTDATA function</bookmark_value>
598 </bookmark>
599 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_GETPIVOTDATA" id="bm_id897854" localize="false"/>
600 <paragraph xml-lang="en-US" id="hd_id3747062" role="heading" level="2" l10n="NEW">GETPIVOTDATA</paragraph>
601 <paragraph xml-lang="en-US" id="par_id3593859" role="paragraph" l10n="NEW"><ahelp hid=".">The GETPIVOTDATA function returns a result value from a DataPilot table. The value is addressed using field and item names, so it remains valid if the layout of the DataPilot table changes.</ahelp></paragraph>
602 <paragraph xml-lang="en-US" id="hd_id9741508" role="heading" level="3" l10n="NEW">Syntax</paragraph>
603 <paragraph xml-lang="en-US" id="par_id909451" role="paragraph" l10n="NEW">Two different syntax definitions can be used:</paragraph>
604 <paragraph xml-lang="en-US" id="par_id1665089" role="code" l10n="NEW">GETPIVOTDATA(TargetField; DataPilot; [ Field 1; Item 1; ... ])</paragraph>
605 <paragraph xml-lang="en-US" id="par_id4997100" role="code" l10n="NEW">GETPIVOTDATA(DataPilot; Constraints)</paragraph>
606 <paragraph xml-lang="en-US" id="par_id1672109" role="paragraph" l10n="NEW">The second syntax is assumed if exactly two parameters are given, of which the first parameter is a cell or cell range reference. The first syntax is assumed in all other cases. The Function Wizard shows the first syntax.</paragraph>
607 <paragraph xml-lang="en-US" id="hd_id9464094" role="heading" level="3" l10n="NEW">First Syntax</paragraph>
608 <paragraph xml-lang="en-US" id="par_id9302346" role="paragraph" l10n="NEW">
609 <emph>TargetField</emph> is a string that selects one of the DataPilot table's data fields. The string can be the name of the source column, or the data field name as shown in the table (like "Sum - Sales").</paragraph>
610 <paragraph xml-lang="en-US" id="par_id8296151" role="paragraph" l10n="NEW">
611 <emph>DataPilot</emph> is a reference to a cell or cell range that is positioned within a DataPilot table or contains a DataPilot table. If the cell range contains several DataPilot tables, the table that was created last is used.</paragraph>
612 <paragraph xml-lang="en-US" id="par_id4809411" role="paragraph" l10n="NEW">If no <emph>Field n / Item n</emph> pairs are given, the grand total is returned. Otherwise, each pair adds a constraint that the result must satisfy. <emph>Field n</emph> is the name of a field from the DataPilot table. <emph>Item n</emph> is the name of an item from that field.</paragraph>
613 <paragraph xml-lang="en-US" id="par_id6454969" role="paragraph" l10n="NEW">If the DataPilot table contains only a single result value that fulfills all of the constraints, or a subtotal result that summarizes all matching values, that result is returned. If there is no matching result, or several ones without a subtotal for them, an error is returned. These conditions apply to results that are included in the DataPilot table.</paragraph>
614 <paragraph xml-lang="en-US" id="par_id79042" role="paragraph" l10n="NEW">If the source data contains entries that are hidden by settings of the DataPilot table, they are ignored. The order of the Field/Item pairs is not significant. Field and item names are not case-sensitive.</paragraph>
615 <paragraph xml-lang="en-US" id="par_id7928708" role="paragraph" l10n="CHG">If no constraint for a page field is given, the field's selected value is implicitly used. If a constraint for a page field is given, it must match the field's selected value, or an error is returned. Page fields are the fields at the top left of a DataPilot table, populated using the "Page Fields" area of the DataPilot Layout dialog. From each page field, an item (value) can be selected, which means only that item is included in the calculation.</paragraph>
616 <paragraph xml-lang="en-US" id="par_id3864253" role="paragraph" l10n="NEW">Subtotal values from the DataPilot table are only used if they use the function "auto" (except when specified in the constraint, see <item type="literal">Second Syntax</item> below).</paragraph>
617 <paragraph xml-lang="en-US" id="hd_id3144016" role="heading" level="3" l10n="NEW">Second Syntax</paragraph>
618 <paragraph xml-lang="en-US" id="par_id9937131" role="paragraph" l10n="NEW">
619 <emph>DataPilot</emph> has the same meaning as in the first syntax.</paragraph>
620 <paragraph xml-lang="en-US" id="par_id5616626" role="paragraph" l10n="CHG">
621 <emph>Constraints</emph> is a space-separated list. Entries can be quoted (single quotes). The whole string must be enclosed in quotes (double quotes), unless you reference the string from another cell.</paragraph>
622 <paragraph xml-lang="en-US" id="par_id4076357" role="paragraph" l10n="NEW">One of the entries can be the data field name. The data field name can be left out if the DataPilot table contains only one data field, otherwise it must be present. </paragraph>
623 <paragraph xml-lang="en-US" id="par_id8231757" role="paragraph" l10n="CHG">Each of the other entries specifies a constraint in the form <item type="literal">Field[Item]</item> (with literal characters [ and ]), or only <item type="literal">Item</item> if the item name is unique within all fields that are used in the DataPilot table.<comment>i82342</comment></paragraph>
624 <paragraph xml-lang="en-US" id="par_id3168736" role="paragraph" l10n="CHG">A function name can be added in the form <emph>Field[Item;Function]</emph>, which will cause the constraint to match only subtotal values which use that function. The possible function names are Sum, Count, Average, Max, Min, Product, Count (Numbers only), StDev (Sample), StDevP (Population), Var (Sample), and VarP (Population), case-insensitive.</paragraph><comment>UFI: Example from spec doc is quite difficult to localize. Try to find other one</comment>
625 </section>
626 </sort>
627 <section id="relatedtopics">
628 <embed href="text/scalc/01/04060100.xhp#drking"/>
629 </section>
630 </body>
631 </helpdocument>