ExcelBanter

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

fzl2007

countif
 
How do I modify =COUNTIF($E$2:$E$250,J2) so that 250 is dynamic which
will be the row count with data?

isabelle

countif
 
hi,

if there are no empty cell in the range E2:Ex

=COUNTIF(OFFSET($E$2,,,COUNTA($E:$E)),J2)

otherwise an array formula (validate with ctrl+maj+enter)

=COUNTIF(INDIRECT("E2:E"&MAX(IF(NOT(ISBLANK(E2:E65 536)),ROW(E2:E65536)))),J2)

--
isabelle


Le 2012-04-06 11:27, fzl2007 a écrit :
How do I modify =COUNTIF($E$2:$E$250,J2) so that 250 is dynamic which
will be the row count with data?


isabelle

countif
 
a bit shorter

array formula (validate with ctrl+maj+enter)
=COUNTIF(INDIRECT("E2:E"&MATCH(9^9,E:E)),J2)

--
isabelle



Le 2012-04-06 11:56, isabelle a écrit :
hi,

if there are no empty cell in the range E2:Ex

=COUNTIF(OFFSET($E$2,,,COUNTA($E:$E)),J2)

otherwise an array formula (validate with ctrl+maj+enter)

=COUNTIF(INDIRECT("E2:E"&MAX(IF(NOT(ISBLANK(E2:E65 536)),ROW(E2:E65536)))),J2)



All times are GMT +1. The time now is 10:58 AM.

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