Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default If with countif or counta

Hi
Any help?
I want to count cells that contain numbers with criteria, I used these
functions, but it returns false, the range can contain data or are
blank, I want to count the nonblank only that meet the criteria <50 or
<60. What I wanted is to count if the cells contain numbers, and not
count the blank cells, and if all cells are empty, return blank””.
30 50 60 50 70 80 60 20 50 60 60 80 90

IF(ISNUMBER(D11:F11);COUNTIF(D11:F11;"<50")
+IF(ISNUMBER(G11:J12);COUNTIF(G11:J11;"<60")
+IF(ISNUMBER(K11:L11);COUNTIF(K11:L11;"<50")
+IF(ISNUMBER(M11:P11);COUNTIF(M11:P11;"<60")
+IF(ISNUMBER(Q11:S11);COUNTIF(Q11:S11;"<50")
+IF(ISNUMBER(T11:W11);COUNTIF(T11:W11;"<60")
+IF(ISNUMBER(X11:Y11);COUNTIF(X11:Y11;"<50");""))) ))))
Thanks in advance
Jam
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default If with countif or counta

See your other post

--
Biff
Microsoft Excel MVP


wrote in message
...
Hi
Any help?
I want to count cells that contain numbers with criteria, I used these
functions, but it returns false, the range can contain data or are
blank, I want to count the nonblank only that meet the criteria <50 or
<60. What I wanted is to count if the cells contain numbers, and not
count the blank cells, and if all cells are empty, return blank””.
30 50 60 50 70 80 60 20 50 60 60 80 90

IF(ISNUMBER(D11:F11);COUNTIF(D11:F11;"<50")
+IF(ISNUMBER(G11:J12);COUNTIF(G11:J11;"<60")
+IF(ISNUMBER(K11:L11);COUNTIF(K11:L11;"<50")
+IF(ISNUMBER(M11:P11);COUNTIF(M11:P11;"<60")
+IF(ISNUMBER(Q11:S11);COUNTIF(Q11:S11;"<50")
+IF(ISNUMBER(T11:W11);COUNTIF(T11:W11;"<60")
+IF(ISNUMBER(X11:Y11);COUNTIF(X11:Y11;"<50");""))) ))))
Thanks in advance
Jam


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default If with countif or counta

On Sun, 28 Sep 2008 08:33:23 -0700 (PDT), wrote:

Hi
Any help?
I want to count cells that contain numbers with criteria, I used these
functions, but it returns false, the range can contain data or are
blank, I want to count the nonblank only that meet the criteria <50 or
<60. What I wanted is to count if the cells contain numbers, and not
count the blank cells, and if all cells are empty, return blank””.
30 50 60 50 70 80 60 20 50 60 60 80 90

IF(ISNUMBER(D11:F11);COUNTIF(D11:F11;"<50")
+IF(ISNUMBER(G11:J12);COUNTIF(G11:J11;"<60")
+IF(ISNUMBER(K11:L11);COUNTIF(K11:L11;"<50")
+IF(ISNUMBER(M11:P11);COUNTIF(M11:P11;"<60")
+IF(ISNUMBER(Q11:S11);COUNTIF(Q11:S11;"<50")
+IF(ISNUMBER(T11:W11);COUNTIF(T11:W11;"<60")
+IF(ISNUMBER(X11:Y11);COUNTIF(X11:Y11;"<50");"")) )))))
Thanks in advance
Jam


At least in XL2007, COUNTIF with a number criteria ignores blanks (and text).

So an equivalent formula to count the values that meet your criteria would be:

=COUNTIF(D11:F11;"<50")
+COUNTIF(G11:J11;"<60")
+COUNTIF(K11:L11;"<50")
+COUNTIF(M11:P11;"<60")
+COUNTIF(Q11:S11;"<50")
+COUNTIF(T11:W11;"<60")
+COUNTIF(X11:Y11;"<50")

To add to that your criteria of returning a blank if all cells are empty, then
use this:

=IF(COUNT(D11:Y11)=0;"";
COUNTIF(D11:F11;"<50")
+COUNTIF(G11:J11;"<60")
+COUNTIF(K11:L11;"<50")
+COUNTIF(M11:P11;"<60")
+COUNTIF(Q11:S11;"<50")
+COUNTIF(T11:W11;"<60")
+COUNTIF(X11:Y11;"<50"))

--ron
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default If with countif or counta

=IF(COUNT(D11:Y11),SUM(COUNTIF(INDIRECT({"D11:F11" ,"K11:L11","Q11:S11","X11:Y11"}),"<50"),COUNTIF(IN DIRECT({"G11:J11","M11:P11","T11:W11"}),"<60")),"" )


" wrote:

Hi
Any help?
I want to count cells that contain numbers with criteria, I used these
functions, but it returns false, the range can contain data or are
blank, I want to count the nonblank only that meet the criteria <50 or
<60. What I wanted is to count if the cells contain numbers, and not
count the blank cells, and if all cells are empty, return blank€¯€¯.
30 50 60 50 70 80 60 20 50 60 60 80 90

IF(ISNUMBER(D11:F11);COUNTIF(D11:F11;"<50")
+IF(ISNUMBER(G11:J12);COUNTIF(G11:J11;"<60")
+IF(ISNUMBER(K11:L11);COUNTIF(K11:L11;"<50")
+IF(ISNUMBER(M11:P11);COUNTIF(M11:P11;"<60")
+IF(ISNUMBER(Q11:S11);COUNTIF(Q11:S11;"<50")
+IF(ISNUMBER(T11:W11);COUNTIF(T11:W11;"<60")
+IF(ISNUMBER(X11:Y11);COUNTIF(X11:Y11;"<50");""))) ))))
Thanks in advance
Jam

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
Formula Help based around countif and counta Mark McDonough Excel Discussion (Misc queries) 2 June 6th 06 02:11 PM
countif counta with multiple lookup criteria JR573PUTT Excel Discussion (Misc queries) 1 February 15th 06 07:37 PM
Errors in COUNT, COUNTA, COUNTIF when counting merged cells Outback Excel Worksheet Functions 1 February 7th 06 04:29 PM
CountIF, CountA,Which one? or neither? amy Excel Discussion (Misc queries) 2 July 20th 05 07:09 PM
COUNTA, COUNTIF? Newbie Excel Worksheet Functions 1 March 18th 05 11:33 AM


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

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"