Count If's: Determining criteria

montanaaggie

Board Regular
Joined
Nov 11, 2005
Messages
124
Office Version
  1. 365
Platform
  1. Windows
I am trying to look at in column B that is 1000 rows long

In row 1001, I have the following equation =countif(B1:B1000, 1). Therefore it brings me back any entry that's value is 1.

I am now trying to create a formula that will do the same thing but instead of 1, I want to count if the value is between 5 and 10. =COUNTIF($B$1:$B$1000, 5=>x<=10). I know my criteria is wrong, but I can't figure it out. Any help is appreciated
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
A couple ways...

1. Use 2 countifs...
=COUNTIF(B1:B1000,">=5")-COUNTIF(B1:B1000,">10")

2. Sumproduct
=SUMPRODUCT(--(B1:B1000>=5),--(B1:B1000<=10))


Hope that Helps.
 
Upvote 0
Another option (only with integers)

=SUMPRODUCT(COUNTIF(B1:B1000,ROW(5:10)))

or for excel 2007 or 2010

=COUNTIFS(B1:B1000,">=5",B1:B1000,"<=10")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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