Solved

Excel Formula for counting

Posted on 2013-01-25
3
112 Views
Last Modified: 2013-01-26
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
0
Comment
Question by:rckrch
  • 2
3 Comments
 
LVL 24

Expert Comment

by:Steve
ID: 38820588
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))
0
 

Author Comment

by:rckrch
ID: 38820621
Thanks!!! That worked.  I tried this function before, but it did not work.  Where did the 'N' come from?
0
 
LVL 24

Accepted Solution

by:
Steve earned 255 total points
ID: 38820644
N turns a boolean True or False to a 1 or 0
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now