COUNTIFS range

I’d like to count the number of cells that contain a value bigger than 0 and smaller than 5, but using the following syntax I get an error: =COUNTIFS(A1:A10;">0"&"<5"); How should 0 < x < 5 be represented?

Thanks!

Hello,

0 < x < 5 is a short notation of “two conditions for x need to be satisfied simultaneously”. Therefore create a 2 parameter set for each condition - i.e use: =COUNTIFS(A1:A10;">0";A1:A10;"<5")

Ref.: LibreOffice Help - COUNTIFS function, which states:

The logical relation between criteria can be defined as logical AND (conjunction). In other words, if and only if all given criteria are met, a value from the corresponding cell of the given Func_Range is taken into calculation.

Alternative: =SUMPRODUCT((A1:A10>0)*(A1:A10<5))

Hope that helps.