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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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,223,382
Messages
6,171,767
Members
452,422
Latest member
rlynchbro

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