diff options
author | Joel Madero <jmadero.dev@gmail.com> | 2016-10-26 13:02:16 -0700 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2016-11-08 19:00:19 +0000 |
commit | 578e1e320daaa82b2d3b8c0eeea84bf704967939 (patch) | |
tree | b436a6f23c426d7435ef2e5f942b8412498b1c19 | |
parent | 433c4c0477c6dfcde68ed5b1eb98f1811095f050 (diff) |
tdf#103397 - added example for Transpose function
Added a simple example to the help for transpose() function
Added tablehead style to example rows/columns
Change-Id: I464983d480cb237a53e033005057a1faef0b9193
Reviewed-on: https://gerrit.libreoffice.org/30334
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
-rw-r--r-- | source/text/scalc/01/04060107.xhp | 123 |
1 files changed, 120 insertions, 3 deletions
diff --git a/source/text/scalc/01/04060107.xhp b/source/text/scalc/01/04060107.xhp index 3a8e01487d..842121ad92 100644 --- a/source/text/scalc/01/04060107.xhp +++ b/source/text/scalc/01/04060107.xhp @@ -575,7 +575,7 @@ <paragraph id="hd_id3156366" role="heading" level="3" xml-lang="en-US">Syntax</paragraph> <paragraph id="par_id3156380" role="code" xml-lang="en-US">MDETERM(Array)</paragraph> <paragraph id="par_id3150290" role="paragraph" xml-lang="en-US"><emph>Array</emph> represents a square array in which the determinants are defined.</paragraph> -<paragraph id="par_idN11035" role="note" xml-lang="en-US">You can find a general introduction to using Array functions on top of this page.</paragraph> +<paragraph id="par_idN11635" role="note" xml-lang="en-US">You can find a general introduction to using Array functions on top of this page.</paragraph> <paragraph id="par_idN11333" role="paragraph" localize="false" xml-lang="en-US"><embedvar href="text/scalc/00/00000004.xhp#moreontop"/></paragraph> </section> @@ -632,11 +632,128 @@ <paragraph id="hd_id3155294" role="heading" level="3" xml-lang="en-US">Syntax</paragraph> <paragraph id="par_id3153843" role="code" xml-lang="en-US">TRANSPOSE(Array)</paragraph> <paragraph id="par_id3153857" role="paragraph" xml-lang="en-US"><emph>Array</emph> represents the array in the spreadsheet that is to be transposed.</paragraph> -<paragraph id="par_idN115A5" role="paragraph" localize="false" xml-lang="en-US"><embedvar href="text/scalc/00/00000004.xhp#moreontop"/></paragraph> +<paragraph id="par_idN11035" role="note" xml-lang="en-US">You can find a general introduction to using Array functions on top of this page.</paragraph> <paragraph id="hd_id3159352" role="heading" level="3" xml-lang="en-US">Example</paragraph> <paragraph id="par_id3159366" role="paragraph" xml-lang="en-US">In the spreadsheet, select the range in which the transposed array can appear. If the original array has n rows and m columns, your selected range must have at least m rows and n columns. Then enter the formula directly, select the original array and press <switchinline select="sys"><caseinline select="MAC">Shift+Command+Enter </caseinline><defaultinline>Shift+Ctrl+Enter</defaultinline></switchinline>. Or, if you are using the <emph>Function Wizard</emph>, mark the <emph>Array</emph> check box. The transposed array appears in the selected target range and is protected automatically against changes.</paragraph> + +<table id="tbl_id6215816"> + <tablerow> + <tablecell> + </tablecell> + <tablecell> + <paragraph id="par_idN11B3G" role="tablehead" localize="false" xml-lang="en-US">A</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B46" role="tablehead" localize="false" xml-lang="en-US">B</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B6C" role="tablehead" localize="false" xml-lang="en-US">C</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B52" role="tablehead" localize="false" xml-lang="en-US">D</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN11B69" role="tablehead" localize="false" xml-lang="en-US">1</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B8F" role="tableicontent" localize="false" xml-lang="en-US"><item type="input">2</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B35" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">3</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B1B" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">4</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B21" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">5</item></paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN11B38" role="tablehead" localize="false" xml-lang="en-US">2</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B6F" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">6</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B75" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">7</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B81" role="tablecontent" xlocalize="false" ml-lang="en-US"><item type="input">8</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN11B7H" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">9</item></paragraph> + </tablecell> + </tablerow> +</table> + +The above table is 2 rows, 4 columns. In order to transpose it, you must select 4 rows, 2 columns. Assuming you want to transpose the above table to the range A7:B10 (4 rows, 2 columns) you must select the entire range and then enter the following: + +<paragraph id="par_id3166145" role="code" xml-lang="en-US">TRANSPOSE(A1:D2)</paragraph> + +Then <emph>make sure to enter it as matrix formula with <switchinline select="sys"><caseinline select="MAC">Shift+Command+Enter +</caseinline><defaultinline>Shift+Ctrl+Enter</defaultinline></switchinline></emph>. The result will be as follows: + +<table id="tbl_id6215816"> + <tablerow> + <tablecell> + </tablecell> + <tablecell> + <paragraph id="par_idN21B2H" role="tablehead" localize="false" xml-lang="en-US">A</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN21B38" role="tablehead" localize="false" xml-lang="en-US">B</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN21B50" role="tablehead" localize="false" xml-lang="en-US">7</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN21B4G" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">2</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN21B57" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">6</item></paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN21B70" role="tablehead" localize="false" xml-lang="en-US">8</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN21B6F" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">3</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN21B77" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">7</item></paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN21B70" role="tablehead" localize="false" xml-lang="en-US">9</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN31B6F" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">4</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN31B77" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">8</item></paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_idN51B70" role="tablehead" localize="false" xml-lang="en-US">10</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN51B6F" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">5</item></paragraph> + </tablecell> + <tablecell> + <paragraph id="par_idN61B77" role="tablecontent" localize="false" xml-lang="en-US"><item type="input">9</item></paragraph> + </tablecell> + </tablerow> +</table> </section> <section id="Section8"> @@ -1145,4 +1262,4 @@ </section> </body> -</helpdocument>
\ No newline at end of file +</helpdocument> |