ExcelBanter

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

bikerhal

COUNTIF criteria
 
How do I use COUNTIF (or SUMIF) where the criteria is of the form X and the
value of X is contained in a cell?

For example, COUNTIF(A1: A5, B1) does not work in Excel 2003

Thanks

Pete_UK

COUNTIF criteria
 
Do it like this:

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

The condition is treated as if it were a string, hence the quotes.

Hope this helps.

Pete

On Apr 15, 7:56*pm, bikerhal
wrote:
How do I use COUNTIF (or SUMIF) where the criteria is of the form X and the
value of X is contained in a cell?

For example, COUNTIF(A1: A5, B1) does not work in Excel 2003

Thanks



Mike H

COUNTIF criteria
 
It works if you correct the syntax :)

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

Mike

"bikerhal" wrote:

How do I use COUNTIF (or SUMIF) where the criteria is of the form X and the
value of X is contained in a cell?

For example, COUNTIF(A1: A5, B1) does not work in Excel 2003

Thanks



All times are GMT +1. The time now is 11:22 AM.

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