Help Needed with simplifying

gdrowell

New Member
Joined
Dec 13, 2017
Messages
40
Is there a way to use the Countif function (or any function) to look up a range of criteria?

Example:

If i had a range of numbers (with repeating values), I would want to know How many times a range of numbers appear.

Right now I use =COUNTIF(A1:A100, "20"), if i wanted to see how many times "20" appears.

What i am looking for is a Function equation that can lookup multiple numbers in a range, then you the COUNT function to give me a total number of appearance ( i.e. How many time numbers 20-50, appear in the range of numbers)


Any help would be appreciated
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
If you have the COUNTIFS function in your Excel version then

=COUNTIFS(A1:A100,">=20",A1:A100,"<=50")


Otherwise

=SUMPRODUCT(--(A1:A100>=20),--(A1:A100<=50))


or you could use a double COUNTIF like this

=COUNTIF(A1:A100,"<=50")-COUNTIF(A1:A100,"<20")
 
Last edited:
Upvote 0
=countif(a1:a100,">19")-countif(a1:a100,">50")
 
Last edited:
Upvote 0
=countif(a1:a100,">19")-countif(a1:a100,">50")
Obviously we posted at the same time but this would include numbers like 19.2 (if fractional numbers are possible with the OP's data) in the 20-50 range so to be safe it would need to be
=COUNTIF(A1:A100,">=20")-COUNTIF(A1:A100,">50")
 
Upvote 0
Thank you all for your assistance. Can I do this , looking for random numbers in the Criteria? (ie, I only want to count how many times certain numbers ( ex: 7, 8, 15, 26, 33, 44, etc ) appear)
 
Upvote 0
=COUNTIF($F$2:$F$11,A9) + COUNTIF($F$2:$F$11,A10) + COUNTIF($F$2:$F$11,A11)

Above is what i came up with (using Mr. Excel MVP mulitple countif). But i want don't want to have to do that for a whole section of Column A (i.e A9 to A11)
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

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