source/text/scalc/01/04060109.xhp |   24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

New commits:
commit 35a7913f2075a9b73fd2c8d41473adface5711bb
Author:     Olivier Hallot <olivier.hal...@libreoffice.org>
AuthorDate: Mon Mar 20 15:24:47 2023 -0300
Commit:     Olivier Hallot <olivier.hal...@libreoffice.org>
CommitDate: Wed Mar 22 18:17:33 2023 +0000

    tdf#139027 Help information for Calc's INDEX() function
    
    Change-Id: I23b4b923329ba6d2783d4a2f02d9e02d3786f708
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/149179
    Tested-by: Jenkins
    Reviewed-by: Olivier Hallot <olivier.hal...@libreoffice.org>

diff --git a/source/text/scalc/01/04060109.xhp 
b/source/text/scalc/01/04060109.xhp
index 1e6d28d8e0..9c4ca09efe 100644
--- a/source/text/scalc/01/04060109.xhp
+++ b/source/text/scalc/01/04060109.xhp
@@ -179,32 +179,36 @@
 </bookmark>
 <bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_INDEX" id="bm_id3157989" 
localize="false"/>
 <h2 id="hd_id3151221">INDEX</h2>
-<paragraph xml-lang="en-US" id="par_id3150268" role="paragraph"><ahelp 
hid="HID_FUNC_INDEX">INDEX returns a sub range, specified by row and column 
number, and/or an optional range index.</ahelp></paragraph>
+<paragraph xml-lang="en-US" id="par_id3150268" role="paragraph"><ahelp 
hid="HID_FUNC_INDEX">INDEX returns a value or an array of values from a 
reference range, specified by row and column index number or array of row and 
array of columns index numbers, and an optional range index.</ahelp></paragraph>
          <embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
          <paragraph xml-lang="en-US" id="par_id3149007" 
role="code">INDEX(Reference [; [Row] [; [Column] [; Range]]])</paragraph>
          <paragraph xml-lang="en-US" id="par_id3153260" role="paragraph">
-           <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 list of references or range names in parentheses, or use the 
tilde (~) concatenation/union operator.</paragraph>
+            <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 list of references or range names in parentheses, or use the 
tilde (~) <link href="text/scalc/01/04060199.xhp#referenceoperators">range 
concatenation operator</link>.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3145302" role="paragraph">
-            <emph>Row</emph> (optional) represents the row index of the 
reference range, for which to return a value. In case of zero or omitted (no 
specific row) all referenced rows are returned.</paragraph>
+            <emph>Row</emph> (optional) represents the row or the array of row 
indexes of the reference range, for which to return a value. In case of zero or 
omitted (no specific row) all referenced rows are returned.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3154628" role="paragraph">
-            <emph>Column</emph> (optional) represents the column index of the 
reference range, for which to return a value. In case of zero or omitted (no 
specific column) all referenced columns are returned.</paragraph>
+            <emph>Column</emph> (optional) represents the column or array of 
column indexes of the reference range, for which to return a value. In case of 
zero or omitted (no specific column) all referenced columns are 
returned.</paragraph>
+         <note id="par_id621679327293280">If <emph>Row</emph>, 
<emph>Column</emph> or both are ommitted or defined as arrays of indexes, the 
INDEX function must be entered as an <link 
href="text/scalc/01/04060107.xhp">array function</link>.</note>
          <paragraph xml-lang="en-US" id="par_id3155514" role="paragraph">
-            <emph>Range</emph> (optional) represents the index of the subrange 
if referring to a multiple range, default 1.</paragraph>
+            <emph>Range</emph> (optional) represents the index of the subrange 
if referring to a multiple range, default is 1.</paragraph>
         <embed href="text/scalc/01/common_func.xhp#sectionexample"/>
+        <paragraph role="paragraph" 
id="par_id541679331443608"><input>{=INDEX({1,3,5;7,9,10},{2;1},1)}</input> 
return a 2 row array containing 7 and 1. The row index {2;1} pick row 2 then 
row 1. The columns index 1 picks the first column.</paragraph>
+        <paragraph role="paragraph" 
id="par_id511679333116273"><input>{=INDEX(D3:G12,{1;2;3;4},{3,1})}</input> 
return a 4 rows by 2 columns array. The row index array {1;2;3;4} picks rows 3 
to 6 and {3;1} picks the third (F) and first column (D). Columns 1 and 3 of the 
source reference are swapped in the resulting array.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3159112" role="paragraph">
             <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>
          <paragraph xml-lang="en-US" id="par_id3150691" role="paragraph">
             <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>Sheet - 
Named Ranges and Expressions - Define</emph>.</paragraph>
          <paragraph xml-lang="en-US" id="par_id4109012" role="paragraph">
-            <item type="input">=INDEX(A1:B6;1)</item> returns a reference to 
the first row of A1:B6.</paragraph>
+            <input>{=INDEX(A1:B6;1)}</input> returns the values of the first 
row of A1:B6. Enter the formula as an <link 
href="text/scalc/01/04060107.xhp">array formula</link>.</paragraph>
          <paragraph xml-lang="en-US" id="par_id9272133" role="paragraph">
-            <item type="input">=INDEX(A1:B6;0;1)</item> returns a reference to 
the first column of A1:B6.</paragraph>
+            <input>{=INDEX(A1:B6;0;1)}</input> returns the values of the first 
column of A1:B6. Enter the formula as an <link 
href="text/scalc/01/04060107.xhp">array formula</link>.</paragraph>
          <paragraph xml-lang="en-US" id="par_id3148595" role="paragraph">
             <item type="input">=INDEX(A1:B6;1;1)</item> indicates the value in 
the upper-left of the A1:B6 range.</paragraph>
          <paragraph xml-lang="en-US" id="par_id9960020" role="paragraph">
-            <item type="input">=INDEX((A1:B6;C1:D6);0;0;2)</item> returns a 
reference to the second range C1:D6 of the multiple range.</paragraph>
-         <paragraph xml-lang="en-US" id="par_id3158419" role="paragraph">
-           <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>Sheet - Named Ranges and Expressions - Define</emph> as 
<emph>multi</emph> with the expression <emph>(A1:B6;C1:D6)</emph> for example. 
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>
+            <input>{=INDEX((A1:B6;C1:D6);0;0;2)}</input> returns the values of 
the second range C1:D6 of the multiple range. Enter the formula as an <link 
href="text/scalc/01/04060107.xhp">array formula</link>.</paragraph>
+         <section id="relatedtopics">
+            <tip id="par_id701677016751508"><link 
href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/INDEX";>INDEX
 wiki page</link>.</tip>
+         </section>
       </section>
       <section id="Section6">
 <bookmark xml-lang="en-US" branch="index" 
id="bm_id3153181"><bookmark_value>INDIRECT function</bookmark_value>

Reply via email to