Formula,help please.

R

rahmad

Hi all,
I've tried to insert a formula to cell,but it seems
I can't figure it out.I want a formula that results
like below
If cell C7 = 0 it result is 0 , if C7 is 1 untill 6 it result 1,
if C7>6 it result =1.
How does to make it works.Please advise
 
J

jan

rahmad,

My translation from what you asked:

if C7=0 then 0
if C7<>0 then 1

You the can use:

=IF(C7=0;0;1)

or

=1*(C7<>0)

But probably my translation was not what you mentioned?

Jan
 
M

Max

Another thought ..
Maybe you mean:
=IF(C7="","",IF(C7=0,0,IF(AND(C7>0,C7<=1),"Undefined",1)))
Replace "Undefined" with the value that you want returned should C7 be
greater than 0 and less than 1. This was not mentioned in your post.
 
R

rahmad

But sorry,
I was wrong in my previous message,
I want if C7>6 it results 0
Would you like to help?
 
J

joeu2004

rahmad said:
I want a formula that results like below
If cell C7 = 0 it result is 0 , if C7 is 1 untill 6 it result 1,
if C7>6 it result =1.

But sorry, I was wrong in my previous message,
I want if C7>6 it results 0
Would you like to help?

Perhaps the following will work for you:

=if(and(c7>=1,c7<=6), 1, 0)

Alternatively:

=1*and(c7>=1,c7<=6)

Note that this returns 0 if C7<0, a case that you did not cover.
 
Top