From 2487e71ba257e1115eda0cab2d86186845b07239 Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sun, 20 Apr 2025 17:03:16 +0200 Subject: Related tdf#166251 Use ";" for separator in SUMIF function Change-Id: Iccec35b9eb3d0f783d73dc7ea63bb9407deb51dd Reviewed-on: https://gerrit.libreoffice.org/c/help/+/184388 Reviewed-by: Olivier Hallot Tested-by: Jenkins --- source/text/scalc/01/func_sumif.xhp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/text') diff --git a/source/text/scalc/01/func_sumif.xhp b/source/text/scalc/01/func_sumif.xhp index 2e92efcca9..c04eb5ad64 100644 --- a/source/text/scalc/01/func_sumif.xhp +++ b/source/text/scalc/01/func_sumif.xhp @@ -40,20 +40,20 @@

Simple usage

- =SUMIF(C2:C6,">=100") + =SUMIF(C2:C6;">=100") Sums only the values from range C2:C6 that are >=100. Returns 370 because cells C2:C3 do not meet the criterion. The values from Range are summed because no SumRange is given. - =SUMIF(B2:B5,">=20",C2:C6) + =SUMIF(B2:B5;">=20";C2:C6) Sums values from the range B2:B6 only if the corresponding values in the range A1:A5 are >=20. Returns 340 because the fifth and sixth rows do not meet the criterion.

Using regular expressions

- =SUMIF(A2:A6,"pen",C2:C5) + =SUMIF(A2:A6;"pen";C2:C5) Sums values from the range C2:C6 only if the corresponding range in A2:A6 exactly match the letters "pen". Returns 85 because rows A2 and A4:A6 do not meet the criterion. - =SUMIF(A2:A6,"pen*",C2:C6) + =SUMIF(A2:A6;"pen*";C2:C6) Sums the values from the range C2:C6 only if the corresponding cell in range A2:A6 contains the letters "pen". Returns the value 150 because rows A4:A5 do not meet the criterion. - =SUMIF(ProductName,"pen*",Revenue) + =SUMIF(ProductName;"pen*";Revenue) A named range can be given as the Range or SumRange parameter. For example, if the columns in the above table are respectively named "ProductName", "Sales", and "Revenue", the function returns 150. This function will only work as described if you have defined the names of the columns using the Define Names dialog.

Reference to a cell as a criterion

If you need to change a criterion easily, you may specify it in a separate cell and use a reference to this cell in the condition of the SUMIF function. For example: - =SUMIF(A2:A6,E2,C2:C6) + =SUMIF(A2:A6;E2;C2:C6) If E2 = pen, the function returns 85 because the link to the cell is substituted with its contents.
-- cgit