#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default If and Countif

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: 2,344
Default If and Countif

Hi,

This is easier in 2007 but in 2003 something like this would work:
=IF(SUM(ISNUMBER(G11:J11)*(G11:J11<60),ISNUMBER(K1 1:L11)*(K11:L11<50),ISNUMBER(M11:P11)*(M11:P11<60) ,ISNUMBER(Q11:S11)*(Q11:S11<50),ISNUMBER(T11:W11)* (T11:W11<60),ISNUMBER(X11:Y11)*(X11:Y11<50))=0,"", SUM(ISNUMBER(G11:J11)*(G11:J11<60),ISNUMBER(K11:L1 1)*(K11:L11<50),ISNUMBER(M11:P11)*(M11:P11<60),ISN UMBER(Q11:S11)*(Q11:S11<50),ISNUMBER(T11:W11)*(T11 :W11<60),ISNUMBER(X11:Y11)*(X11:Y11<50)))

You can simplify this by formatting the cell with a custom format of
#,##0_);(#,##0);;

Then the formula would read:

=SUM(ISNUMBER(G11:J11)*(G11:J11<60),ISNUMBER(K11:L 11)*(K11:L11<50),ISNUMBER(M11:P11)*(M11:P11<60),IS NUMBER(Q11:S11)*(Q11:S11<50),ISNUMBER(T11:W11)*(T1 1:W11<60),ISNUMBER(X11:Y11)*(X11:Y11<50))

Both of these formulas require array entry, press Shift Ctrl Enter to enter
them, not just Enter.
--
Thanks,
Shane Devenshire


" 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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default If and Countif

What kind of numbers are you dealing with? Are they integers (whole numbers)
?

If they're integers, try this:

=IF(COUNT(D11:Y11),FREQUENCY((D11:F11,K11:L11,Q11: S11,X11:Y11),50-0.1)+FREQUENCY((G11:J11,M11:P11,T11:W11),60-0.1),"")

--
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


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
HELP! countif addicted Excel Worksheet Functions 3 May 22nd 06 01:26 PM
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


All times are GMT +1. The time now is 09:24 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"