ExcelBanter

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

Jeanette

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

Aladin Akyurek

=LOOKUP(E430,{-9.99999999999999E+307,0;1,1;339,4;340,1;352,4;353, 1})

Jeanette wrote:
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)))))))


RLA49

Hi,
Try this: =IF(A1=0,0,IF(OR(A1=339,A1=352),4,1))

Your formula did not evaluate any cell for the values you specifed. 'A1' is
the cell where the data is. This formula goes in a different cell.

RLA49


"Jeanette" wrote:

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


Jeanette

Worked like a breaze . . . much easier. . . THANKS

"RLA49" wrote:

Hi,
Try this: =IF(A1=0,0,IF(OR(A1=339,A1=352),4,1))

Your formula did not evaluate any cell for the values you specifed. 'A1' is
the cell where the data is. This formula goes in a different cell.

RLA49


"Jeanette" wrote:

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



All times are GMT +1. The time now is 03:52 PM.

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