• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Ranges of between numbers

Hi
I have a list of values and I would like to know how many fall between different values.
Please can you show me and explain the simplest way.
range
-10 -20, -30, -50
thank you
David.
 

Attachments

  • array.xlsx
    72.4 KB · Views: 6
COUNTIF:

Your issue, is that you are missing values between -10 & -11 etc due to misuse of greater than, less than etc. >-10 excludes -10 and greater, and <=-11 excludes values less than -11.

Modify your formula to...
=COUNTIFS(Q2:Q508,"<=0",Q2:Q508,">=-10")
=COUNTIFS(Q2:Q508,"<-10",Q2:Q508,">=-30")

So on so forth.

FREQUENCY:
Frequency calculates number of data that belongs to each bin.

Note following:

1. Frequency returns VERTICAL array.

2. Frequency will return 1 item more than bin array. This is by design to return count of data that is greater than largest bin.

3. Each bin counts values up to and including bin value and excludes values already accounted for in other bin.

So, since you have negative values, you'd first need to turn those into positive values to use your desired bin. And to accommodate for horizontal structure of your bin array, you'll need to transpose return values.
Enter following in S14:
=TRANSPOSE(FREQUENCY(ABS(Q2:Q508),S13:U13))

Then select S14 to V14 and press F2, then CNTRL + SHIFT + ENTER

See attached.
 

Attachments

  • array.xlsx
    74 KB · Views: 12
Back
Top