From 7b824f49fb1a71b173ed318241f99aeb7320eac0 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Mon, 27 May 2024 14:46:51 -0300 Subject: tdf#159872 Review Help for SORT/SORTBY function + Fix syntax definition Change-Id: I9b24b25bdeb4298f6ba12f605b783324b3b921d1 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/168115 Tested-by: Jenkins Reviewed-by: Olivier Hallot --- source/text/scalc/01/func_sort.xhp | 12 ++++++------ source/text/scalc/01/func_sortby.xhp | 9 +++++---- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'source') diff --git a/source/text/scalc/01/func_sort.xhp b/source/text/scalc/01/func_sort.xhp index e0f9b694c8..a771ccbfa2 100644 --- a/source/text/scalc/01/func_sort.xhp +++ b/source/text/scalc/01/func_sort.xhp @@ -26,12 +26,12 @@ Enter the formula as an array formula. -SORT(Range [, SortIndex[, SortOrder[, ByCol]]]) -Range: Required. The range or array to sort. -SortIndex: Optional. The number indicating the row or column to sort by. -SortOrder: Optional. A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order. -ByCol: Optional. A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column. - +SORT(Range [; SortIndex [; SortOrder [; ByCol] ] ]) +Range: the range or array to sort. +SortIndex: (optional). The number indicating the row or column to sort by. +SortOrder: (optional). A number indicating the desired sort order; 1 for ascending order (default), -1 for descending order. +ByCol: (optional). A logical value indicating the desired sort direction; FALSE to sort by row (default), TRUE to sort by column. +

Example with ascending order

diff --git a/source/text/scalc/01/func_sortby.xhp b/source/text/scalc/01/func_sortby.xhp index 332005731a..1f0f045a47 100644 --- a/source/text/scalc/01/func_sortby.xhp +++ b/source/text/scalc/01/func_sortby.xhp @@ -25,12 +25,13 @@ Sorts the contents of a range or array based on the values in a corresponding range or array. -SORTBY(Range, SortByRange1, SortOrder1[, SortByRange2, SortOrder2,[...]]) +SORTBY(Range; SortByRange1; SortOrder1 [; SortByRange2; SortOrder2,[...] ]) Range: The array or range to sort. -SortByRange1, SortByRange2,... : Range 1, range 2,... are the arrays or ranges to sort on. -SortOrder1, SortOrder2,... : Order 1, order 2,... are the orders to use for sorting. 1 for ascending, -1 for descending. Default is ascending. +SortByRange1, SortByRange2,... : range 1, range 2,... are the arrays or ranges to sort on. +SortOrder1, SortOrder2,... : order 1, order 2,... are the orders to use for sorting. 1 for ascending, -1 for descending. Default is ascending. + -{=SORTBY(A2:C7,A2:A7,1,C2:C7,-1)} +{=SORTBY(A2:C7;A2:A7;1;C2:C7;-1)} Sort the range A2:C7 based on the first column in ascending order and third column in descending order. -- cgit