ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   COUNTIF oddity (https://www.excelbanter.com/excel-worksheet-functions/144521-countif-oddity.html)

Phil C

COUNTIF oddity
 
Hi All

Im sure this must be very simple but..
I have got a column of integer numbers (formatted general), say A1:A20
I just want to count the number of cells with values greater than a certain
figure (integer stored in a different cell, say B1)
But =COUNTIF(A1:A20,"B1") incorrectly returns a value of zero.
=COUNTIF(A1:A20,6) works OK .....as does =COUNTIF(A1:A20,B1), but I want
B1.

Even Excel (Insert|Function|Countif) puts the syntax as
=COUNTIF(A1:A20,"B1").

Help appreciated

Phil

Excel 2003.




Mike H

COUNTIF oddity
 
Phil,

Try:-

=COUNTIF(A1:A20,""&B1)

Mike

"Phil C" wrote:

Hi All

Im sure this must be very simple but..
I have got a column of integer numbers (formatted general), say A1:A20
I just want to count the number of cells with values greater than a certain
figure (integer stored in a different cell, say B1)
But =COUNTIF(A1:A20,"B1") incorrectly returns a value of zero.
=COUNTIF(A1:A20,6) works OK .....as does =COUNTIF(A1:A20,B1), but I want
B1.

Even Excel (Insert|Function|Countif) puts the syntax as
=COUNTIF(A1:A20,"B1").

Help appreciated

Phil

Excel 2003.






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

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