ExcelBanter

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

falcon491

COUNTIF FUNCTION
 
What would the sytax be to do a countif() function with a dynamic range? For
instance: =CountIf($H$3:$J$(value of cell A3),"=1")
Thank You very much

Elkar

COUNTIF FUNCTION
 
You can use the INDIRECT function for this:

=COUNTIF(INDIRECT("H3:J"&$A$3),"=1")

Note that cell references placed in quotes "" within the INDIRECT function
will not increment when the formula is copied, thus no need for absolute
referencing ($). But, since the A3 reference is outside of the quotes, it
will increment if the $ symbols are not present.

HTH,
Elkar


"falcon491" wrote:

What would the sytax be to do a countif() function with a dynamic range? For
instance: =CountIf($H$3:$J$(value of cell A3),"=1")
Thank You very much


falcon491

COUNTIF FUNCTION
 
Thank You Very Much! Worked Great!!

"Elkar" wrote:

You can use the INDIRECT function for this:

=COUNTIF(INDIRECT("H3:J"&$A$3),"=1")

Note that cell references placed in quotes "" within the INDIRECT function
will not increment when the formula is copied, thus no need for absolute
referencing ($). But, since the A3 reference is outside of the quotes, it
will increment if the $ symbols are not present.

HTH,
Elkar


"falcon491" wrote:

What would the sytax be to do a countif() function with a dynamic range? For
instance: =CountIf($H$3:$J$(value of cell A3),"=1")
Thank You very much



All times are GMT +1. The time now is 03:28 PM.

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