ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Variable reference in countif (https://www.excelbanter.com/excel-worksheet-functions/181712-variable-reference-countif.html)

Libby

Variable reference in countif
 
Hi there,

A1 contains a formula which gives a number, eg 127
How do I think incorporate this into a countif, eg
=countif( E6:E value in A1,"apples")

Many thanks.

PCLIVE

Variable reference in countif
 
Use INDIRECT:

=COUNTIF(INDIRECT("E6:E" & A1),"apples")

HTH,
Paul

--

"Libby" wrote in message
...
Hi there,

A1 contains a formula which gives a number, eg 127
How do I think incorporate this into a countif, eg
=countif( E6:E value in A1,"apples")

Many thanks.




T. Valko

Variable reference in countif
 
Another one:

=COUNTIF(E6:INDEX(E:E,A1),"apples")

If A1 is empty the entire range, E:E, will be calculated.


--
Biff
Microsoft Excel MVP


"Libby" wrote in message
...
Hi there,

A1 contains a formula which gives a number, eg 127
How do I think incorporate this into a countif, eg
=countif( E6:E value in A1,"apples")

Many thanks.





All times are GMT +1. The time now is 05:21 PM.

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