Count between the nubmers

  • Thread starter Thread starter Aladin Akyurek
  • Start date Start date
A

Aladin Akyurek

=SUMPRODUCT(--(Range>=20),--(Range<=40))

Note that the formula effects an inclusive between. Remove = if exclusive
between is intended.
 
Hello,

How can I count a list of number or data that is between
20 and 40?

For example...
100
34
23
98
45
37

Number of entries between 20 & 40 is "3".

Thanks,
David
 
What if you want to find this information for a specific
group...
Using the example below:
For example...
PA 100
PA 34
NV 23
NV 98
OK 45
OK 37
Can you count how many of PA are between 20 & 40 only?
 
=SUMPRODUCT(--($A$2:$A$7="PA"),--($B$2:$B$7>=20),--($B$2:$B$7<=40))

You can also use cell addresses for conditions, for example:

=SUMPRODUCT(--($A$2:$A$7=D2),--($B$2:$B$7>=E1),--($B$2:$B$7<=F1))

where D2 houses a value like PA, E1 20, and F1 40.
 
Aladin

Yours last post re: counting occurences between to numbers you posted a reply

=SUMPRODUCT(--(Range>=20),--(Range<=40)

I tried this formula: =SUM((D7:D12>=20)*(D7:D12<=40)) which works!

Whats with the -- before the arguments

Thank

Alby
 
Back
Top