ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   counting occurrences in a range (https://www.excelbanter.com/excel-discussion-misc-queries/36243-counting-occurrences-range.html)

Judy Felfe

counting occurrences in a range
 
How do I count the number of occurrences of values between 25,000 and 50,000
within a range of numbers? I have tried

countif(g2:g1695,AND("=25000","<50000"))

but it gives a result of 0. Thanks in advance.

Bob Phillips

=SUMPRODUCT(--(G2:G1695=25000),--(G2:G1695<50000))


--
HTH

Bob Phillips

"Judy Felfe" wrote in message
...
How do I count the number of occurrences of values between 25,000 and

50,000
within a range of numbers? I have tried

countif(g2:g1695,AND("=25000","<50000"))

but it gives a result of 0. Thanks in advance.




Judy Felfe

Thanks for the quick response. It worked. I can't say I understand the
formula. Could you break it down for me?

g2:g1695=25000 is one array, but what does it mean?
what do the double minus signs mean?
Thanks in advance, again!

"Bob Phillips" wrote:

=SUMPRODUCT(--(G2:G1695=25000),--(G2:G1695<50000))


--
HTH

Bob Phillips

"Judy Felfe" wrote in message
...
How do I count the number of occurrences of values between 25,000 and

50,000
within a range of numbers? I have tried

countif(g2:g1695,AND("=25000","<50000"))

but it gives a result of 0. Thanks in advance.





Bob Phillips

all explained at http://www.xldynamic.com/source/xld.SUMPRODUCT.html

--
HTH

Bob Phillips

"Judy Felfe" wrote in message
...
Thanks for the quick response. It worked. I can't say I understand the
formula. Could you break it down for me?

g2:g1695=25000 is one array, but what does it mean?
what do the double minus signs mean?
Thanks in advance, again!

"Bob Phillips" wrote:

=SUMPRODUCT(--(G2:G1695=25000),--(G2:G1695<50000))


--
HTH

Bob Phillips

"Judy Felfe" wrote in message
...
How do I count the number of occurrences of values between 25,000 and

50,000
within a range of numbers? I have tried

countif(g2:g1695,AND("=25000","<50000"))

but it gives a result of 0. Thanks in advance.








All times are GMT +1. The time now is 08:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com