Hi Gérard,
Gérard Fargeot schrieb:
Hi,
razor7 wrote
Hi, i'm trying to calculate sum of a column on certain values of other
column. I want to sum all the values from column "value" only if
corresponding "id" column value is "9, 10 or 11".
My SUMIF functin looks like this
*=SUMIF(D2:D187;"9,10,11";E2:E187)* where D2 is "id" column and E2 is
"value" column.
So far i get 0 as SUMIF result but result may be "180"
=SUMIF(A2:A7,"9|10|11",B2:B7)
With "Regular expressions" enabled in Tools> Options> LibreOffice Calc>
Calculate.
That does not work for me.
Here some other suggestions, if you really want exact 9, 10 and 11.
In the examples (1) and (2) the array column separator is set to ; and
array row separator is set to | . You find the settings in Tools >
Options > Calc > Formula > Seperators
(1)
=SUM(SUMIF(A2:A7;{9|10|11};B2:B7))
or
=SUM(SUMIF(A2:A7;{9;10;11};B2:B7))
Entering as array-function.
(2)
=DSUM(A1:B7;"value";{"id"|"=9"|"=10"|"=11"})
Notice, that the left range includes the header cells.
(3)
=SUM((A2:A7=11)*B2:B7 ; (A2:A7=10)*B2:B7 ; (A2:A7=9)*B2:B7)
Entering as array-function.
(4)
=SUMIF(A2:A7;"=9";B2:B7) + SUMIF(A2:A7;"=10";B2:B7) +
SUMIF(A2:A7;"=11";B2:B7)
If you do not mean exact 9,10,11 but mean the range 9<=x<=11, you can use
=SUMIF(A2:A7;"<=11";B2:B7)-SUMIF(A2:A7;"<9";B2:B7)
Kind regards
Regina
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted