Link to home
Start Free TrialLog in
Avatar of rckrch
rckrchFlag for United States of America

asked on

Excel Formula for counting

I am trying to count the number of value in a range between 2 values.  The worksheet formula below returns 0.  That is wrong it should return 1.  There is one number between 80 and 90 in the range.

=COUNT(IF(AND(E36:P36>=80,E36:P36<=90),"True","False"))

Can anyone help?

Thanks
Avatar of Steve
Steve
Flag of United Kingdom of Great Britain and Northern Ireland image

Try COUNTIFS:

=COUNTIFS(E36:P36,">=80",E36:P36,"<=90")

There are many other ways too such as:
=SUMPRODUCT(N(E36:P36>=80),N(E36:P36<=90))
Avatar of rckrch

ASKER

Thanks!!! That worked.  I tried this function before, but it did not work.  Where did the 'N' come from?
ASKER CERTIFIED SOLUTION
Avatar of Steve
Steve
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial