ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting cells between ranges (https://www.excelbanter.com/excel-discussion-misc-queries/100839-counting-cells-between-ranges.html)

Jason30

Counting cells between ranges
 
How do I count the number of cells that have values between for example $1000
and $2000?

Max

Counting cells between ranges
 
"Jason30" wrote:
How do I count the number of cells
that have values between for example $1000 and $2000?


One way is to use 2 countifs ..
Assuming source data in col A, placed in say, B1:
=COUNTIF(A:A,"=1000")-COUNTIF(A:A,"2000")
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---

Franz Verga

Counting cells between ranges
 
Jason30 wrote:
How do I count the number of cells that have values between for
example $1000 and $2000?


If your range is A1:A100, you could use this formula:

=COUNTIF(A1:A100,"<="&2000)-COUNTIF(A1:A100,"<"&1000)


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



Peo Sjoblom

Counting cells between ranges
 
=COUNTIF(A1:A100,"=1000")-COUNTIF(A1:A100,"2000")

or

=SUMPRODUCT(--(A1:A100=1000),--(A1:A100<=2000))


both formulas include 1000 and 2000, if you really want between use "1000"
and "=2000"
in the first and 1000 and <2000 for the last


--


Regards,

Peo Sjoblom

Excel 95 - Excel 2007
Northwest Excel Solutions
www.nwexcelsolutions.com


"Jason30" wrote in message
...
How do I count the number of cells that have values between for example
$1000
and $2000?




Dave Peterson

Counting cells between ranges
 
=countif(a1:a10,""&1000) - countif(a1:a10,""&2000)

is one way. (I'm not sure what should happen at 1000 and 2000, though. You may
want to change the to = in either or both (or none).)

Jason30 wrote:

How do I count the number of cells that have values between for example $1000
and $2000?


--

Dave Peterson

Jason30

Counting cells between ranges
 
Thanks for the replies guys

"Jason30" wrote:

How do I count the number of cells that have values between for example $1000
and $2000?


Max

Counting cells between ranges
 
"Jason30" wrote:
Thanks for the replies guys


You're welcome, Jason!
Thanks for the feedback ..

Ahh, if only every original poster was like you ..
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---


All times are GMT +1. The time now is 09:22 AM.

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