Baby stuff I know-if

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

HI, Which formula I need to write So when the cell in A1 is >0 but <1 then
give me 1; but if >1 then give me the number

thanks
 
Joe said:
HI, Which formula I need to write So when the cell in A1 is >0 but <1 then
give me 1; but if >1 then give me the number

thanks

What if A1<=0?
What if A1=1?

maybe this will do?
=MAX(A1,1)
 
it has to be as follows:

eg A1 = 0.5, A2=1.3, A3=0

So, If >0 but less than 1 I want to have 1 but If it is higher than 1 and
want to the number

So
For A1 I would have 1
For A2 I would have 1.3
For A3 I would have 0

Regards,
jose
 
Just use Stephen's formula as he posted it. Put this...

=MAX(A1,1)

in B1 and then copy it down. It will return 1 when A1 is less than 1 and the
number in A1 if that number is greater than (or equal to) 1.

Rick
 
You still haven't told us what you want if the input is less than 0.

If you want the input value to be used as the output in that case, then
=IF(AND(A1>0,A1<1),1,A1)
 
Thanks to all for the help. It really works.

How does it work? I mean. What does the AND do? So I understand the logic :-)
 
an IF statement works by saying (Statement, Result if True, Result if False)

What the AND lets you do is include two statements, so both have to be true.
I find its sometimes helpful to go through the Formula Evalutation in the
tools menu
 
Back
Top