ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   > and < criteria in one single expression in excel (https://www.excelbanter.com/new-users-excel/4589-%3E-%3C-criteria-one-single-expression-excel.html)

ExcelLEarner

> and < criteria in one single expression in excel
 
i would like to know how to filtered out two different criteria for example
less than 40 and greater than 60 in one expression at COUNTIF function.
example of the formula would be appreciated.



JE McGimpsey

One way:

=COUNTIF(A:A,"<60") - COUNTIF(A:A,"<40")


another

=SUMPRODUCT(--(A1:A1000=40),--(A1:A1000<=60))

See

http://www.mcgimpsey.com/excel/doubleneg.html

for an explanation of how the "--" works.



In article ,
ExcelLEarner wrote:

i would like to know how to filtered out two different criteria for example
less than 40 and greater than 60 in one expression at COUNTIF function.
example of the formula would be appreciated.



All times are GMT +1. The time now is 01:23 AM.

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