#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Countif

I am trying to create a countif formula that meets the following criteria:

if <=0, 0
if =1<=338, 1
if =339, 4
if =340<=351, 1
if =352, 4
if =353, 1

So far, I can only get a value of 1 to return for all criteria with the
following formula:
=+COUNT(IF(430<=0,0,IF(E430=1<=338,1,IF(E430=340 <=351,1,IF(E430353,1,IF(E430=339,4,IF(E430=352,4, 0)))))))
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Countif

=if(E430<=0,0,if(E430=339,4,if(E430=352,4,1)))

--
Regards,
Tom Ogilvy


"Jeanette" wrote in message
...
I am trying to create a countif formula that meets the following criteria:

if <=0, 0
if =1<=338, 1
if =339, 4
if =340<=351, 1
if =352, 4
if =353, 1

So far, I can only get a value of 1 to return for all criteria with the
following formula:

=+COUNT(IF(430<=0,0,IF(E430=1<=338,1,IF(E430=340 <=351,1,IF(E430353,1,IF(E
430=339,4,IF(E430=352,4,0)))))))


  #3   Report Post  
Posted to microsoft.public.excel.programming
KL KL is offline
external usenet poster
 
Posts: 201
Default Countif

Hi Jeannette,

I am not sure I totally understand what you are trying to do. Your COUNT
function will count the number of results that your nested IF expression
would return and it is 1 by definition. On the other hand, based on the
criteria described you could create the following formula:

=(OR(E430={339,345}))*3+(E4300)

Regards,
KL


"Jeanette" wrote in message
...
I am trying to create a countif formula that meets the following criteria:

if <=0, 0
if =1<=338, 1
if =339, 4
if =340<=351, 1
if =352, 4
if =353, 1

So far, I can only get a value of 1 to return for all criteria with the
following formula:
=+COUNT(IF(430<=0,0,IF(E430=1<=338,1,IF(E430=340 <=351,1,IF(E430353,1,IF(E430=339,4,IF(E430=352,4, 0)))))))



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
countif ? dmack Excel Discussion (Misc queries) 3 January 25th 07 10:16 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 01:18 PM.

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

About Us

"It's about Microsoft Excel"