Countif with dynamic criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to write a countif statement where the criteria is a range of
numbers from 30 - 39. This is what I've written:

=countif(e2:e1956,">29<40")

Right now it is counting everything over 29.
 
Hi

two methods
=COUNTIF(E2:E1956,">"&29)-COUNTIF(E2:E1956,">"&39)

or
=SUMPRODUCT(--(E2:E1956>29),--(E2:E1956<40))

Cheers
JulieD
 
=SUMPRODUCT(--(E2:A1956>29),--(E2:A1956<40))

or

=COUNTIF(E2:A1956,">29")-COUNTIF(E2:A1956,">=40")

--

HTH

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