countif using cell references in criteria

  • Thread starter Thread starter Hall
  • Start date Start date
H

Hall

Can I use cell references in criteria of the function countif? Can I do
this using a boolean function?

Here's what I want:

=countif( A1:A100, and( >B1, < C1 ) )

ie, count only if the number in the range is between the numbers in b1 and
c1.
 
You can

=COUNTIF(A1:A100,">"&B1)

but you cannot have two conditions

=SUMPRODUCT(--(A1:A100>B1),--(A1:A100<C1))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Excellent! Thanks!

Bob Phillips said:
You can

=COUNTIF(A1:A100,">"&B1)

but you cannot have two conditions

=SUMPRODUCT(--(A1:A100>B1),--(A1:A100<C1))

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top