ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Countif Conditions - Use of conditions that vary by cell value (https://www.excelbanter.com/excel-discussion-misc-queries/189371-countif-conditions-use-conditions-vary-cell-value.html)

JonTarg

Countif Conditions - Use of conditions that vary by cell value
 
I want to count the number of cells in a range that are greater than a
particular number, which I have programmed excel to calculate and display in
a fixed cell.

Unfortunately, when I use that cell's reference in a countif (or countifs)
condition statement, the countif function ignores the cell value. If I
substitute the cell reference by the fixed numerical value in the countif
condition, the countif function calculates the desired value correctly.

Any suggestions about how to use a cell reference rather than a fixed
numerical value in the countif condition syntax?

Mike H

Countif Conditions - Use of conditions that vary by cell value
 
Try

=COUNTIF(A1:A8,"="&B1)
where B1 is the value you are counting

Mike

"JonTarg" wrote:

I want to count the number of cells in a range that are greater than a
particular number, which I have programmed excel to calculate and display in
a fixed cell.

Unfortunately, when I use that cell's reference in a countif (or countifs)
condition statement, the countif function ignores the cell value. If I
substitute the cell reference by the fixed numerical value in the countif
condition, the countif function calculates the desired value correctly.

Any suggestions about how to use a cell reference rather than a fixed
numerical value in the countif condition syntax?



All times are GMT +1. The time now is 12:43 PM.

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