Formula in Excel to show greater than 50, but less than 250?

G

Guest

I have a list of numbers ranging from 2 to 5,000. I need a count of how many
are greater than 50, but less than 250. I would also need a sum once that is
figured out. I've tried everything. This is Excel in Windows XP.
 
G

Guest

Janice --

One of the MVP's will come along with a more elegant solution, but this'll
work too:

A B
1 1 =AND(A1>50,A1<250)
2 51 copy
3 76 down
4 285
..
..
..
=COUNTIF(B1:B4,"TRUE")
=SUMIF(B1:B4,"TRUE",A1:A4)

HTH in a pinch.
 
D

Dav

if you wish to stick with sumif and countif also check if the > and
should be >= or <= for your logic

=sumif(a1:A100,">50")-sumif(a1:a100,">250")
=countif(a1:A100,">50")-countif(a1:a100,">250")

or use sumproduct((a1:A100>50)*(a1:a100<250)) for the count

or use sumproduct((a1:A100>50)*(a1:a100<250)*(a1:a100)) for the sum

regards

Da
 

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