Count help please

RichFost

New Member
Joined
May 13, 2004
Messages
26
o_O Hi all, I'm sure this is easy but.............

I have a range of numbers in cells ranging from 1 to 100. I know how to do a count for those greater than say 40 (COUNTIF(range),"40") and so on but how do I do the same count if I want to specify BETWEEN 40 and 50? This would also apply if I needed to do a sum of the cells fitting in this range.

Thanks in advance
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Hi,

Try:

=SUMPRODUCT(--(A1:A12>=40),--(A1:A12<=50))
to count

and

=SUMPRODUCT(--(A1:A12>=40),--(A1:A12<=50),A1:A12)
to sum
 
Upvote 0
RichFost said:
o_O Hi all, I'm sure this is easy but.............

I have a range of numbers in cells ranging from 1 to 100. I know how to do a count for those greater than say 40 (COUNTIF(range),"40") and so on but how do I do the same count if I want to specify BETWEEN 40 and 50? This would also apply if I needed to do a sum of the cells fitting in this range.

Thanks in advance

=COUNTIF(Range,">="&E2)-COUNTIF(Range,">"&F2)

where E2 and F2 house criterion values like 40 and 50 with E2 <= F2.

Note that the foregoing produces an inclusive between count.

=SUMIF(Range,">="&E2,SumRange)-COUNTIF(Range,">"&F2,SumRange)

for an inclusive between total.
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
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