From 8ae83bb638d652d80fef5b449c43cc6f577cfa24 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Thu, 31 May 2018 15:11:59 -0300 Subject: tdf#117933 help pages for MAXIFS,MINIFS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib0b27e4f00468b33a9a112ac0dc0967750570b18 Reviewed-on: https://gerrit.libreoffice.org/55144 Tested-by: Jenkins Reviewed-by: Sophia Schröder Reviewed-by: Olivier Hallot --- AllLangHelp_scalc.mk | 2 + source/text/scalc/01/func_averageifs.xhp | 2 +- source/text/scalc/01/func_countifs.xhp | 2 +- source/text/scalc/01/func_maxifs.xhp | 70 ++++++++++++++++++++++++++++++++ source/text/scalc/01/func_minifs.xhp | 70 ++++++++++++++++++++++++++++++++ source/text/scalc/01/func_sumifs.xhp | 2 +- 6 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 source/text/scalc/01/func_maxifs.xhp create mode 100644 source/text/scalc/01/func_minifs.xhp diff --git a/AllLangHelp_scalc.mk b/AllLangHelp_scalc.mk index ad9218de29..eba3ef23ba 100644 --- a/AllLangHelp_scalc.mk +++ b/AllLangHelp_scalc.mk @@ -219,6 +219,8 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,scalc,\ helpcontent2/source/text/scalc/01/func_imsinh \ helpcontent2/source/text/scalc/01/func_imtan \ helpcontent2/source/text/scalc/01/func_isoweeknum \ + helpcontent2/source/text/scalc/01/func_maxifs \ + helpcontent2/source/text/scalc/01/func_minifs \ helpcontent2/source/text/scalc/01/func_minute \ helpcontent2/source/text/scalc/01/func_month \ helpcontent2/source/text/scalc/01/common_func_workdaysintl \ diff --git a/source/text/scalc/01/func_averageifs.xhp b/source/text/scalc/01/func_averageifs.xhp index 749a8641ec..a0a94c2923 100644 --- a/source/text/scalc/01/func_averageifs.xhp +++ b/source/text/scalc/01/func_averageifs.xhp @@ -58,7 +58,7 @@ If the range of values for calculating the mean and any range for finding criter =AVERAGEIFS(C2:C6;A2:A6;E2&".*";B2:B6;"<"&MAX(B2:B6)) If E2 = pen, the function returns 65, because the link to the cell is substituted with its content.
-AVERAGE, AVERAGEA, , , , MAX, MIN + AVERAGE, AVERAGEA, , , , , , MAX, MIN
diff --git a/source/text/scalc/01/func_countifs.xhp b/source/text/scalc/01/func_countifs.xhp index b5d10dc223..bb0280dc42 100644 --- a/source/text/scalc/01/func_countifs.xhp +++ b/source/text/scalc/01/func_countifs.xhp @@ -58,7 +58,7 @@ If ranges for arguments Range and Criterion have unequ =COUNTIFS(A2:A6;E2&".*";B2:B6;"<"&MAX(B2:B6)) If E2 = pen, the function returns 1, because the link to the cell is substituted with its content and it works as a function above.
-COUNT, COUNTIF, COUNTA, , , MAX, MIN + COUNT, COUNTIF, COUNTA, , , , , MAX, MIN
diff --git a/source/text/scalc/01/func_maxifs.xhp b/source/text/scalc/01/func_maxifs.xhp new file mode 100644 index 0000000000..238f9cfb4b --- /dev/null +++ b/source/text/scalc/01/func_maxifs.xhp @@ -0,0 +1,70 @@ + + + + + + + MAXIFS function + /text/scalc/01/func_maxifs.xhp + + + + +
+ + + MAXIFS function + maximum;satisfying conditions + +MAXIFS function +Returns the maximum of the values of cells in a range that meets multiple criteria in multiple ranges. +
+ +Syntax +MAXIFS( Max_Range ; Criterion_range1 ; Criterion1 [ ; Criterion_range2 ; Criterion2 [;...]]) + +Max_Range – required argument. A range of cells, a name of a named range or a label of a column or a row containing values for calculating the maximum. +Criterion_range1 – required argument. A range of cells, a named range or a label of a column or a row containing values for finding the corresponding criterion. +Criterion1 – required argument. A string expression of the conditon that defines what cells should be used to calculate the maximum. The expression can contain text, numbers, regular expressions (if enabled in calculation options) or wildcards (if enabled in calculation options). +Criterion_range2 – Optional. Criterion_range2 and all the following mean the same as Criterion_range1. +Criterion2 – Optional. Criterion2 and all the following mean the same as Criterion1. +Max_Range and Criterion_range1, Criterion_range2... must have the same size, otherwise the function returns err:502 - Invalid argument. + +The logical relation between criteria can be defined as logical AND (conjunction). In other words, if and only if all given criteria are met, a value from the corresponding cell of the given Max_Range is taken into calculation of the maximum. + +The function can have up to 255 arguments, meaning that you can specify 127 criteria ranges and criteria for them. + + + +If a cell contains TRUE, it is treated as 1, if a cell contains FALSE – as 0 (zero). + + +In all examples below, ranges for maximum calculation contain the row #6, but it is ignored, because it contains text. + +Simple usage +=MAXIFS(B2:B6;B2:B6;"<35") +Calculates the maximum of values of the range B2:B6 that are greater than or equal to 20. Returns 35. The fifth row does not meet the criterion. +=MAXIFS(C2:C6;B2:B6;">=20";C2:C6;"<90") +Calculates the maximum of values of the range C2:C6 that are lower than 90 and correspond to cells of the B2:B6 range with values greater than or equal to 20. Returns 85, because the fourth and fifth rows do not meet at least one criterion. +Using regular expressions and nested functions +=MAXIFS(C2:C6;B2:B6;">"&MIN(B2:B6);B2:B6;"<"&MAX(B2:B6)) +Calculates the maximum of values of the range C2:C6 that correspond to all values of the range B2:B6 except its minimum and maximum. Returns 190, because only the fourth row meet the criteria. +=MAXIFS(C2:C6;A2:A6;"pen.*";B2:B6;"<="&MAX(B2:B6)) +Calculates the maximum of values of the range C2:C6 that correspond to all cells of the A2:A6 range starting with "pen" and to all cells of the B2:B6 range except its maximum. Returns 85, because only the third row meets all criteria. +Reference to a cell as a criterion +If you need to change a criterion easily, you may want to specify it in a separate cell and use a reference to this cell in the condition of the MAXIFS function. For example, the above function can be rewritten as follows: +=MAXIFS(C2:C6;A2:A6;E2&".*";B2:B6;"<"&MAX(B2:B6)) +If E2 = "pen", the function returns 65, because the reference to the cell is substituted with its content. +
+ SUM, SUMIF, , , , MAX, MIN + +
+ +
diff --git a/source/text/scalc/01/func_minifs.xhp b/source/text/scalc/01/func_minifs.xhp new file mode 100644 index 0000000000..e09ec40a4d --- /dev/null +++ b/source/text/scalc/01/func_minifs.xhp @@ -0,0 +1,70 @@ + + + + + + + MINIFS function + /text/scalc/01/func_minifs.xhp + + + + +
+ + + MINIFS function + minimum;satisfying conditions + +MINIFS function +Returns the minimum of the values of cells in a range that meets multiple criteria in multiple ranges. +
+ +Syntax +MINIFS( Min_Range ; Criterion_range1 ; Criterion1 [ ; Criterion_range2 ; Criterion2 [;...]]) + +Min_Range – required argument. A range of cells, a name of a named range or a label of a column or a row containing values for calculating the minimum. +Criterion_range1 – required argument. A range of cells, a named range or a label of a column or a row containing values for finding the corresponding criterion. +Criterion1 – required argument. A string expression of the conditon that defines what cells should be used to calculate the minimum. The expression can contain text, numbers, regular expressions (if enabled in calculation options) or wildcards (if enabled in calculation options). +Criterion_range2 – Optional. Criterion_range2 and all the following mean the same as Criterion_range1. +Criterion2 – Optional. Criterion2 and all the following mean the same as Criterion1. +Min_Range and Criterion_range1, Criterion_range2... must have the same size, otherwise the function returns err:502 - Invalid argument. + +The logical relation between criteria can be defined as logical AND (conjunction). In other words, if and only if all given criteria are met, a value from the corresponding cell of the given Min_Range is taken into calculation of the minimum. + +The function can have up to 255 arguments, meaning that you can specify 127 criteria ranges and criteria for them. + + + +If a cell contains TRUE, it is treated as 1, if a cell contains FALSE – as 0 (zero). + + +In all examples below, ranges for minimum calculation contain the row #6, but it is ignored, because it contains text. + +Simple usage +=MINIFS(B2:B6;B2:B6;"<35") +Calculates the minimum of values of the range B2:B6 that are lower than or equal to 20. Returns 17. +=MINIFS(C2:C6;B2:B6;">=20";C2:C6;">90") +Calculates the minimum of values of the range C2:C6 that are lower than 90 and correspond to cells of the B2:B6 range with values greater than or equal to 20. Returns 190. +Using regular expressions and nested functions +=MINIFS(C2:C6;B2:B6;">"&MIN(B2:B6);B2:B6;"<"&MAX(B2:B6)) +Calculates the minimum of values of the range C2:C6 that correspond to all values of the range B2:B6 except its minimum and minimum. Returns 65. +=MINIFS(C2:C6;A2:A6;".*book";B2:B6;"<="&MAX(B2:B6)) +Calculates the minimum of values of the range C2:C6 that correspond to all cells of the A2:A6 range starting with "pen" and to all cells of the B2:B6 range except its minimum. Returns 180. +Reference to a cell as a criterion +If you need to change a criterion easily, you may want to specify it in a separate cell and use a reference to this cell in the condition of the MINIFS function. For example, the above function can be rewritten as follows: +=MINIFS(C2:C6;A2:A6;".*"&E2;B2:B6;"<"&MAX(B2:B6)) +If E2 = "book", the function returns 180, because the reference to the cell is substituted with its content. +
+ SUM, SUMIF, , , , MAX, MIN + +
+ +
diff --git a/source/text/scalc/01/func_sumifs.xhp b/source/text/scalc/01/func_sumifs.xhp index 280358d71d..641da17892 100644 --- a/source/text/scalc/01/func_sumifs.xhp +++ b/source/text/scalc/01/func_sumifs.xhp @@ -65,7 +65,7 @@ The function can have up to 255 arguments, meaning that you can specify 127 crit If E2 = pen, the function returns 65, because the link to the cell is substituted with its content.
- SUM, SUMIF, , , MAX, MIN + SUM, SUMIF, , , , , MAX, MIN
-- cgit