Using CountIf for a range of criteria

I want to be able to Count a range of Cells if
the value in the cells are greater than 20 and less than fifty

The CountIf function only appears to have the ability to handle one criteria eg >30

Who is Participating?
tureConnect With a Mentor Commented:

You are right. CounIf only handles one criteria.
To accomplish what you ask for, use CountIf twice, like this:

=COUNTIF(A1:A20,">20") - COUNTIF(A1:A20,">=50")

Ture Magnusson
Karlstad, Sweden
nmilmineAuthor Commented:
Thanks Ture

This question was awarded, but never cleared due to the JSP-500 errors of that time.  It was "stuck" against userID -1 versus the intended expert whom you awarded.  This corrects the problem and the expert will now receive these points; points verified.

Please click on your Member Profile and select "View Question History" to navigate through any open or locked questions you may have to update and finalize them.  If you are an EE Pro user, you can also choose Power Search to find all your open questions.

This is the Community Support link, if help is needed, along with the link to All Topics which reflects many TAs recently added.

In efforts to help all Members maintain their open questions, this is a reminder to click your Member Profile, expand your question history and find/update all your Open and Locked questions.
Thank you,
Moderator @ Experts Exchange
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.