ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   combining countif with AND function (https://www.excelbanter.com/excel-worksheet-functions/50161-combining-countif-function.html)

Daesthai

combining countif with AND function
 
I'm a bit confused combining these two functions.

What would I use if I wanted to count the cells in a table that are greater
than 1.5 but lower than 2.5?

=countif(B4:H28,AND("1.5","<2.5")) gives me back an incorrect count, so
I'm doing something wrong.

=)

Anne Troy

See the example he
http://www.officearticles.com/excel/...ft_excel.h tm
************
Anne Troy
www.OfficeArticles.com

"Daesthai" wrote in message
...
I'm a bit confused combining these two functions.

What would I use if I wanted to count the cells in a table that are
greater
than 1.5 but lower than 2.5?

=countif(B4:H28,AND("1.5","<2.5")) gives me back an incorrect count, so
I'm doing something wrong.

=)




Biff

Hi!

Try this:

=COUNTIF(B4:H28,"1.5")-COUNTIF(B4:H28,"2.5")

Biff

"Daesthai" wrote in message
...
I'm a bit confused combining these two functions.

What would I use if I wanted to count the cells in a table that are
greater
than 1.5 but lower than 2.5?

=countif(B4:H28,AND("1.5","<2.5")) gives me back an incorrect count, so
I'm doing something wrong.

=)




Biff

Ooops!

You wanted <2.5, so:

=COUNTIF(B4:H28,"1.5")-COUNTIF(B4:H28,"2.4")

Biff

"Biff" wrote in message
...
Hi!

Try this:

=COUNTIF(B4:H28,"1.5")-COUNTIF(B4:H28,"2.5")

Biff

"Daesthai" wrote in message
...
I'm a bit confused combining these two functions.

What would I use if I wanted to count the cells in a table that are
greater
than 1.5 but lower than 2.5?

=countif(B4:H28,AND("1.5","<2.5")) gives me back an incorrect count, so
I'm doing something wrong.

=)







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

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