Ask LibreOffice - RSS feedhttps://ask.libreoffice.org/en/questions/Questions and answers for LibreOfficeenSun, 21 Jul 2019 07:59:08 +0200What is the formula to add two of the lowests numbers in a group of cells>https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/ What is the formula to add two of the lowests numbers in a group of cellsSat, 20 Jul 2019 16:18:41 +0200https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/Answer by 0for4 for <p>What is the formula to add two of the lowests numbers in a group of cells</p>
https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?answer=201720#post-id-201720=sum(small(b1:b4,1)+(small(b1:b4,2)))Sat, 20 Jul 2019 17:30:45 +0200https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?answer=201720#post-id-201720Comment by Opaque for <p>=sum(small(b1:b4,1)+(small(b1:b4,2)))</p>
https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?comment=201722#post-id-201722The `SUM` in your solution is obsolete since it sums a single value, which already is the sum of two other values (`+` already means: *sum the values left and right to the operator*)
`=SUM(SMALL(B1:B4,1),SMALL(B1:B4,2))` -- or --
`=SMALL(B1:B4,1) + SMALL(B1:B4,2)`Sat, 20 Jul 2019 17:42:03 +0200https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?comment=201722#post-id-201722Comment by pierre-yves samyn for <p>=sum(small(b1:b4,1)+(small(b1:b4,2)))</p>
https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?comment=201769#post-id-201769Hi
If the number of cells to be added increases it may become interesting to use:
=SUMPRODUCT(SMALL($A$1:$A$10;ROW(A1:A2)))
RegardsSun, 21 Jul 2019 07:59:08 +0200https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?comment=201769#post-id-201769Answer by Opaque for <p>What is the formula to add two of the lowests numbers in a group of cells</p>
https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?answer=201721#post-id-201721Hello,
for the following an for better readabilty assume that the range (group of cells) is a named range called `DATA`. For your specific Problem you may either name your group of cells or replace DATA by the real reference (e.g. DATA equals A1:F8 in my example below. Now there are two case (see question in my comment)
**Case 1** The minimum appears more than once and you define "two of the lowests numbers" twice the minimum.
Then the formula reads:
`{=IF(COUNTIF(DATA;MIN(DATA))>1;MIN(DATA)*2;MIN(DATA)+MIN(IF(DATA<>MIN(DATA);DATA;"")))}`
**Case 2** The minimum appears more than once and you define "two of the lowests numbers" by looking for the next lowest number (neglecting the multiple appearance of the minimum).
Then the formula reads:
`{=MIN(DATA)+MIN(IF(DATA<>MIN(DATA);DATA;""))}`
**Remark to the curly brackets**: They defined array functions and to enter array formulas, just enter the formulas without the `{` and `}` brackets and hit `CTRL+SHIFT+ENTER` instead of just hitting `ENTER`
See the follwing screenshot:
![image description](/upfiles/15636367061878524.png)
Hope that helps.
*If the answer is correct or helped you to fix your problem, please click the check mark (✔) next to the answer.*
Sat, 20 Jul 2019 17:34:28 +0200https://ask.libreoffice.org/en/question/201711/what-is-the-formula-to-add-two-of-the-lowests-numbers-in-a-group-of-cells/?answer=201721#post-id-201721