Forum Discussion
Anne-so78000
Sep 28, 2020Copper Contributor
Formule NB.SI.ENS
Je voudrais avoir mes effectifs d'enfants selon des tranches horaires avec la formule NB.SI.ENS mais cela ne calcul pas mes valeurs. J'ai essayé avec des heures puis avec des chiffres en standard m...
HansVogelaar
Sep 28, 2020MVP
The COUNTIFS (NB.SI.ENS) function returns the number of cells that satisfy ALL conditions simultaneously.
The time cannot be equal to 8 and 8,25 simultaneously, so your formula returns 0.
You can use the following formula in E24:
=NB.SI(E2:E22;"<8,5")
For E25 this would be
=NB.SI.ENS(E2:E22;">=8,5";E2:E22;"<9")
etc.
But this won't work in column G, since G2:G22 does not contain numbers nor time values, but text values that look like times.
You should either enter numbers such as 8,25 and 8,50, or real time values such as 8:15 and 8:30.
If you use the latter, you can use
=NB.SI(G2:G22;"<"&TEMPSVAL("8:30"))
and
=NB.SI.ENS(G2:G22;">="&TEMPSVAL("8:30");G2:G22;"<"&TEMPSVAL("9:00"))