#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 23
Default countif

How do I modify =COUNTIF($E$2:$E$250,J2) so that 250 is dynamic which
will be the row count with data?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 587
Default 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)

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM
countif is one way, any others? Frederick Excel Programming 0 August 8th 03 08:26 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"