ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Using COUNTIF with AND (https://www.excelbanter.com/excel-discussion-misc-queries/193584-using-countif.html)

[email protected]

Using COUNTIF with AND
 
This should be pretty easy; it's a little embarrasing to ask. I'm
trying to count all cells with a value within a specified range. It's
not working. Here is the formula I'm using:

=COUNTIF(A1:A17,(AND(A1:A173,A1:A17<6)))

Where am I going wrong?

Pete_UK

Using COUNTIF with AND
 
Try it this way:

=COUNTIF(A1:A17,"<6") - COUNTIF(A1:A17,"<3")

Hope this helps.

Pete

On Jul 3, 4:15*pm, wrote:
This should be pretty easy; it's a little embarrasing to ask. I'm
trying to count all cells with a value within a specified range. It's
not working. Here is the formula I'm using:

=COUNTIF(A1:A17,(AND(A1:A173,A1:A17<6)))

Where am I going wrong?



Pete_UK

Using COUNTIF with AND
 
Sorry,

strictly speaking it should be:

=COUNTIF(A1:A17,"<6") - COUNTIF(A1:A17,"<=3")

Pete

On Jul 3, 4:20*pm, Pete_UK wrote:
Try it this way:

=COUNTIF(A1:A17,"<6") - COUNTIF(A1:A17,"<3")

Hope this helps.

Pete

On Jul 3, 4:15*pm, wrote:



This should be pretty easy; it's a little embarrasing to ask. I'm
trying to count all cells with a value within a specified range. It's
not working. Here is the formula I'm using:


=COUNTIF(A1:A17,(AND(A1:A173,A1:A17<6)))


Where am I going wrong?- Hide quoted text -


- Show quoted text -



[email protected]

Using COUNTIF with AND
 
On Jul 3, 9:15*am, wrote:
This should be pretty easy; it's a little embarrasing to ask. I'm
trying to count all cells with a value within a specified range. It's
not working. Here is the formula I'm using:

=COUNTIF(A1:A17,(AND(A1:A173,A1:A17<6)))

Where am I going wrong?


That takes care of it. Thanks!

Per Jessen

Using COUNTIF with AND
 
Hi

You could also use this:

=SUMPRODUCT((A1:A173)*1,(A1:A17<6)*1)

Regards,
Per

skrev i meddelelsen
...
On Jul 3, 9:15 am, wrote:
This should be pretty easy; it's a little embarrasing to ask. I'm
trying to count all cells with a value within a specified range. It's
not working. Here is the formula I'm using:

=COUNTIF(A1:A17,(AND(A1:A173,A1:A17<6)))

Where am I going wrong?


That takes care of it. Thanks!


Pete_UK

Using COUNTIF with AND
 
You're welcome, Linda - thanks for feeding back.

Pete

On Jul 3, 4:24*pm, wrote:
That takes care of it. Thanks!




All times are GMT +1. The time now is 04:43 AM.

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