How to write AND condition in Numbers

Solution 1:

You should be able to use COUNTIFS instead of COUNTIF, using the same range for each test-array/condition pair.

=COUNTIFS(test-array,">=16",test-array,"<=30")

In the following example, the formula in A8 is =COUNTIFS(A1:A6,">=16",A1:A6,"<=30")

      A     B     C     D     E
1    10
2    15
3    20
4    25
5    30
6    35
7    
8     3

Solution 2:

If you don't mind a separate column/table for this, you can check if each cell is between 16 and 31 like this:

Table 2, A1:

IF(x::A1>15,IF(x::A1<31,TRUE,FALSE))

Table 2, A9:

COUNTIF(A,"=TRUE")