Formula Greater than Less Than

C

Cindy

I need a formula that states countif numbers in Column A are greater than 30,
but less than 90. Very easy, but I don't know how to do it. My next cell
would then say, countif Column A are greater than 90, but less than 120.
 
B

Bernard Liengme

Be careful (case 1: >30, <90) (case 2: >90, <120) What about equal to 90 -
these get missed
I have reworded for (case 1: >=30, <90)
A number of possibilities

a) =COUNTIF(A:A, ">=30) - COUNTIF(A:A,">=90")
How many are 30 or over MINUS those over 90
b) =SUMPRODUCT(--(A1:A1000>=30),--(A1:A1000<90)
Must be equal or over 30 AND less than 90
Do not use A:A with SUMPRODUCT but use a range
c) FREQUENCY - see Help

More on SUMPRODUCT
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
 
D

David Biddulph

=COUNTIF(A1:A100,">30")-COUNTIF(A1:A100,">=90")
=COUNTIF(A1:A100,">90")-COUNTIF(A1:A100,">=120")
 
C

Cindy

I see your point-Thanks for the great catch.

Bernard Liengme said:
Be careful (case 1: >30, <90) (case 2: >90, <120) What about equal to 90 -
these get missed
I have reworded for (case 1: >=30, <90)
A number of possibilities

a) =COUNTIF(A:A, ">=30) - COUNTIF(A:A,">=90")
How many are 30 or over MINUS those over 90
b) =SUMPRODUCT(--(A1:A1000>=30),--(A1:A1000<90)
Must be equal or over 30 AND less than 90
Do not use A:A with SUMPRODUCT but use a range
c) FREQUENCY - see Help

More on SUMPRODUCT
For more details on SUMPRODUCT
Bob Phillips
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
J.E McGimpsey
http://mcgimpsey.com/excel/formulae/doubleneg.html
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top