ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Baby stuff I know-if (https://www.excelbanter.com/excel-discussion-misc-queries/166198-baby-stuff-i-know-if.html)

Joe

Baby stuff I know-if
 
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


Stephen[_2_]

Baby stuff I know-if
 
"Joe" wrote in message
...
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)



Peo Sjoblom

Baby stuff I know-if
 
=IF(AND(A10,A1<=1),1,A1)



--


Regards,


Peo Sjoblom



"Joe" wrote in message
...
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

Baby stuff I know-if
 
how do I blend that in one just formula?

"Stephen" wrote:

"Joe" wrote in message
...
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)




Joe

Baby stuff I know-if
 
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


"Stephen" wrote:

"Joe" wrote in message
...
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)




Rick Rothstein \(MVP - VB\)

Baby stuff I know-if
 
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


"Joe" wrote in message
...
how do I blend that in one just formula?

"Stephen" wrote:

"Joe" wrote in message
...
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)





David Biddulph[_2_]

Baby stuff I know-if
 
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(A10,A1<1),1,A1)
--
David Biddulph

"Joe" wrote in message
...
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


"Stephen" wrote:

"Joe" wrote in message
...
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)






Joe

Baby stuff I know-if
 
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 :-)

"Peo Sjoblom" wrote:

=IF(AND(A10,A1<=1),1,A1)



--


Regards,


Peo Sjoblom



"Joe" wrote in message
...
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





PaulW

Baby stuff I know-if
 
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

"Joe" wrote:

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

"Peo Sjoblom" wrote:

=IF(AND(A10,A1<=1),1,A1)



--


Regards,


Peo Sjoblom



"Joe" wrote in message
...
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






All times are GMT +1. The time now is 08:02 PM.

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