diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2024-03-27 15:26:45 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@libreoffice.org> | 2024-03-27 19:30:38 +0100 |
commit | e8b0e4366701e46f775cca486ee65a1291c56456 (patch) | |
tree | 74b26a6ac626f8eaaab3ede5f61709abe4785872 | |
parent | 9736fda4e1a2994e1ea7377c37f61bad058f69b8 (diff) |
tdf#159872 Help page for SORTBY function (final).
Change-Id: If3f9746d20aa60bab06c2607e5d8fce557e91f75
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/165431
Tested-by: Jenkins
Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r-- | source/text/scalc/01/ex_data_stat_func.xhp | 12 | ||||
-rw-r--r-- | source/text/scalc/01/func_sort.xhp | 3 | ||||
-rw-r--r-- | source/text/scalc/01/func_sortby.xhp | 162 |
3 files changed, 167 insertions, 10 deletions
diff --git a/source/text/scalc/01/ex_data_stat_func.xhp b/source/text/scalc/01/ex_data_stat_func.xhp index c7898b6ea8..994116e365 100644 --- a/source/text/scalc/01/ex_data_stat_func.xhp +++ b/source/text/scalc/01/ex_data_stat_func.xhp @@ -42,10 +42,10 @@ <paragraph id="par_id18260631312423" role="tablecontent">Product Name</paragraph> </tablecell> <tablecell> - <paragraph id="par_id2509201517433075" role="tablecontent">Sales</paragraph> + <paragraph id="par_id2509201517433075" role="tablecontent" localize="false">Sales</paragraph> </tablecell> <tablecell> - <paragraph id="par_id2509201519383294" role="tablecontent">Revenue</paragraph> + <paragraph id="par_id2509201519383294" role="tablecontent" localize="false">Revenue</paragraph> </tablecell> </tablerow> <tablerow> @@ -106,16 +106,16 @@ </tablerow> <tablerow> <tablecell> - <paragraph id="par_id6009596127912" role="tablehead" localize="false">6</paragraph> + <paragraph id="par_id591711556978009" role="tablehead" localize="false">6</paragraph> </tablecell> <tablecell> - <paragraph id="par_id19479417931163" role="tablecontent">pencil-case</paragraph> + <paragraph id="par_id491711556981497" role="tablecontent">pencil-case</paragraph> </tablecell> <tablecell> - <paragraph id="par_id85353130721737" role="tablecontent">not</paragraph> + <paragraph id="par_id981711556984697" role="tablecontent">not</paragraph> </tablecell> <tablecell> - <paragraph id="par_id15693941827291" role="tablecontent">not</paragraph> + <paragraph id="par_id581711556987385" role="tablecontent">not</paragraph> </tablecell> </tablerow> </table> diff --git a/source/text/scalc/01/func_sort.xhp b/source/text/scalc/01/func_sort.xhp index 7628d9b663..e0f9b694c8 100644 --- a/source/text/scalc/01/func_sort.xhp +++ b/source/text/scalc/01/func_sort.xhp @@ -10,7 +10,7 @@ --> <meta> - <topic id="text/scalc/01/func_sort.xhp" indexer="include" status="PUBLISH"> + <topic id="textscalc01func_sortxhp" indexer="include" status="PUBLISH"> <title id="tit">SORT function</title> <filename>/text/scalc/01/func_sort.xhp</filename> </topic> @@ -161,6 +161,7 @@ <paragraph role="paragraph" id="par_id341640870986703" localize="false"><literal>COM.MICROSOFT.SORT</literal></paragraph> <section id="relatedtopics"> <tip id="par_id701677016751508"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/SORT">SORT wiki page</link>.</tip> + <embed href="text/scalc/01/func_sortby.xhp#h1"/> </section> </body> </helpdocument> diff --git a/source/text/scalc/01/func_sortby.xhp b/source/text/scalc/01/func_sortby.xhp index 41d272f6dd..d22710928e 100644 --- a/source/text/scalc/01/func_sortby.xhp +++ b/source/text/scalc/01/func_sortby.xhp @@ -18,21 +18,177 @@ <body> <bookmark id="bm_id221708806478124" branch="hid/SC_HID_FUNC_SORTBY_MS" localize="false"/> <bookmark branch="index" id="bm_id361708283183878"> - <bookmark_value>SORTBY function</bookmark_value> +<bookmark_value>SORTBY function</bookmark_value> </bookmark> <section id="sortby"> <h1 id="hd_id901708806478126"><variable id="h1"><link href="text/scalc/01/func_sortby.xhp">SORTBY</link></variable></h1> - <paragraph id="par_id771708806478128" role="paragraph">(...)</paragraph> + <paragraph id="par_id771708806478128" role="paragraph">Sorts the contents of a range or array based on the values in a corresponding range or array.</paragraph> </section> <embed href="text/scalc/01/ful_func.xhp#func_head_syntax"/> -<paragraph role="code" id="par_id211708281649651">SORTBY(...)</paragraph> +<paragraph role="code" id="par_id211708281649651">SORTBY(Range, SortByRange1, SortOrder1[, SortByRange2, SortOrder2,[...]])</paragraph> +<paragraph role="paragraph" id="par_id451711544450734"><emph>Range</emph>: The array or range to sort.</paragraph> +<paragraph role="paragraph" id="par_id291711544460323"><emph>SortByRange1, SortByRange2,... </emph>: Range 1, range 2,... are the arrays or ranges to sort on.</paragraph> +<paragraph role="paragraph" id="par_id501711544465886"><emph>SortOrder1, SortOrder2,...</emph> : Order 1, order 2,... are the orders to use for sorting. 1 for ascending, -1 for descending. Default is ascending.</paragraph> <embed href="text/scalc/01/ful_func.xhp#func_head_example"/> +<section id="ex_func_average_table"> + <paragraph role="paragraph" id="hd_id2609201512474295">Consider the following table</paragraph> + <table id="table_averageif_example"> + <tablerow> + <tablecell> + </tablecell> + <tablecell> + <paragraph id="par_id2509201517430799" role="tablehead" localize="false">A</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id250920151743116" role="tablehead" localize="false">B</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201517431582" role="tablehead" localize="false">C</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id2509201517431967" role="tablehead" localize="false">1</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id18260631312423" role="tablecontent" localize="false">Product Name</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201517433075" role="tablecontent" localize="false">Sales</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201519383294" role="tablecontent" localize="false">Revenue</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id959660094035" role="tablehead" localize="false">2</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2855779586764" role="tablecontent" localize="false">pencil</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id110202156219769" role="tablecontent" localize="false">20</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id23281929326512" role="tablecontent" localize="false">65</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id2509201517432278" role="tablehead" localize="false">3</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id24967262611733" role="tablecontent" localize="false">pen</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201517433391" role="tablecontent" localize="false">35</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id250920151938352" role="tablecontent" localize="false">85</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id250920151743267" role="tablehead" localize="false">4</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id252542413030532" role="tablecontent" localize="false">notebook</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201517433781" role="tablecontent" localize="false">20</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201519383822" role="tablecontent" localize="false">190</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id2509201519371339" role="tablehead">5</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201519374677" role="tablecontent" localize="false">book</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201519373350" role="tablecontent" localize="false">17</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id2509201519384171" role="tablecontent" localize="false">180</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id591711556978009" role="tablehead" localize="false">6</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id491711556981497" role="tablecontent" localize="false">pencil-case</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id981711556984697" role="tablecontent">not</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id581711556987385" role="tablecontent">not</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id21711558790356" role="tablehead" localize="false">7</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id611711558792980" role="tablecontent" localize="false">pen</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id531711558796019" role="tablecontent" localize="false">10</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id1001711558799131" role="tablecontent" localize="false">45</paragraph> + </tablecell> + </tablerow> + </table> +</section> +<h4 id="hd_id751711480783220">Example with ascending order and descending order (for English locale)</h4> +<paragraph role="paragraph" id="par_id131711466000482"><input>{=SORTBY(A2:C7,A2:A7,1,C2:C7,-1)}</input></paragraph> +<paragraph role="paragraph" id="par_id471711472262161">Sort the range A2:C7 based on the first column in ascending order and third column in descending order.</paragraph> +<table id="result"> + <tablerow> + <tablecell><paragraph id="par_id131711562867138" role="paragraph" localize="false">book</paragraph></tablecell> + <tablecell><paragraph id="par_id191711562870330" role="paragraph" localize="false">17</paragraph></tablecell> + <tablecell><paragraph id="par_id541711562873250" role="paragraph" localize="false">180</paragraph></tablecell> + </tablerow> + <tablerow> + <tablecell><paragraph id="par_id711711562876682" role="paragraph" localize="false">notebook</paragraph></tablecell> + <tablecell><paragraph id="par_id751711562882018" role="paragraph" localize="false">20</paragraph></tablecell> + <tablecell><paragraph id="par_id731711562884834" role="paragraph" localize="false">190</paragraph></tablecell> + </tablerow> + <tablerow> + <tablecell><paragraph id="par_id411711562887786" role="paragraph" localize="false">pen</paragraph></tablecell> + <tablecell><paragraph id="par_id71711562890593" role="paragraph" localize="false">35</paragraph></tablecell> + <tablecell><paragraph id="par_id771711562894241" role="paragraph" localize="false">85</paragraph></tablecell> + </tablerow> + <tablerow> + <tablecell><paragraph id="par_id441711562897126" role="paragraph" localize="false">pen</paragraph></tablecell> + <tablecell><paragraph id="par_id481711562903505" role="paragraph" localize="false">10</paragraph></tablecell> + <tablecell><paragraph id="par_id761711562907000" role="paragraph" localize="false">45</paragraph></tablecell> + </tablerow> + <tablerow> + <tablecell><paragraph id="par_id271711562909933" role="paragraph" localize="false">pencil</paragraph></tablecell> + <tablecell><paragraph id="par_id591711562914472" role="paragraph" localize="false">20</paragraph></tablecell> + <tablecell><paragraph id="par_id781711562918184" role="paragraph" localize="false">65</paragraph></tablecell> + </tablerow> + <tablerow> + <tablecell><paragraph id="par_id441711562922161" role="paragraph" localize="false">pencil-case</paragraph></tablecell> + <tablecell><paragraph id="par_id981711562925887" role="paragraph" localize="false">not</paragraph></tablecell> + <tablecell><paragraph id="par_id361711562929239" role="paragraph" localize="false">not</paragraph></tablecell> + </tablerow> +</table> + <embed href="text/scalc/01/common_func.xhp#sectiontechinfo"/> <embed href="text/scalc/00/avail_release.xhp#24.8"/> <embed href="text/scalc/01/common_func.xhp#notODFF"/> <paragraph role="paragraph" id="par_id341640870986703" localize="false"><literal>COM.MICROSOFT.SORTBY</literal></paragraph> <section id="relatedtopics"> <tip id="par_id701677016751508"><link href="https://wiki.documentfoundation.org/Documentation/Calc_Functions/SORTBY">SORTBY wiki page</link>.</tip> + <embed href="text/scalc/01/func_sort.xhp#h1"/> </section> </body> </helpdocument> |