Calculating the number of observations that fit a range

seancat

New Member
Joined
Nov 28, 2002
Messages
1
How do I get Excel to indicate the number of observations that fit within a range of values. For example:

Number of observations in a range (A2:Y2) that are >= 150 but<= 300.

I have tried using =countif(range, criteria)but I can't seem to get the correct criteria statement without getting an error message.

Any suggestions are appreciated.

Seancat
This message was edited by seancat on 2002-11-29 02:23
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
On 2002-11-29 02:14, seancat wrote:
How do I get Excel to indicate the number of observations that fit within a range of values. For example:

Number of observations in a range (A2:Y2) that are >= 150 but<= 300.

I have tried using =countif(range, criteria)but I can't seem to get the correct criteria statement without getting an error message.

Any suggestions are appreciated.

Seancat
This message was edited by seancat on 2002-11-29 02:23

If you mean counting entries between 150 and 300...

Use one of:

=SUM(INDEX(((A2:Y2>=150)*(A2:Y2<=300))+0,1,0))

=SUMPRODUCT((A2:Y2>=150)*(A2:Y2<=300))
This message was edited by aladin akyurek on 2002-11-29 09:28
 
Upvote 0
WELCOME TO THE BOARD!

Is this what you are looking for?

=ABS(COUNTIF(A2:Y2,">= 150")-COUNTIF(A2:Y2,"<= 300"))
 
Upvote 0

Forum statistics

Threads
1,221,457
Messages
6,159,968
Members
451,606
Latest member
ephemeruh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top