In LibreOffice Calc: Sumifs with 2 criteria

Ggedeon Posted messages 1 Registration date   Status Member Last intervention   -  
yclik Posted messages 77 Registration date   Status Member Last intervention   -
The SUMIF/COUNT syntax in LibreOffice Calc cannot use ET (AND) inside the criteria this way. Use SUMIFS (or a helper column) to sum when a date is between two values.

Option 1: use SUMIFS
=SUMIFS(E$2:E$30; C$2:C$30; "<=" & Détail.I1; C$2:C$30; ">=" & Détail.H1)

Note: If your locale uses SUMIFS (and semicolon as separator), the syntax above matches:
=SOMME.SI.ENS(E$2:E$30; C$2:C$30; "<=" & Détail.I1; C$2:C$30; ">=" & Détail.H1)

Option 2: with a helper column (if SUMIFS unavailable)
- In a helper column, e.g., F2, put:
=IF(AND(C2 <= Détail.I1; C2 >= Détail.H1); E2; 0)
- Then sum:
=SUM(F$2:F$30)

Assurez-vous que les plages et les opérateurs et les séparateurs respectent votre localisation ( ; comme séparateur d’arguments et , comme séparateur décimal).

3 answers

  1. brucine Posted messages 25329 Registration date   Status Member Last intervention   4 195
     

    Hi as well,

    SUMIF in conjunction with an AND/OR condition is a pain to work with.

    Use SUMIFS instead

    1
  2. yclik Posted messages 77 Registration date   Status Member Last intervention   1 614
     

    hello

    a proposal

    =SUMIFS(D2:D30;C2:C30;">="&Detail.H1;C$2:C$30;"<="&Detail.I1)
    1