SOLVED

# Functions

Copper Contributor

# Functions

Hi, I would like to know how can I command the result on a cell to be between certain range of values (0 to 1). I already have a formula on the cell (with nested if), I just want if the result is below zero, to give zero, and if its above one, to give one.

5 Replies

# Re: Functions

If the value is in A1...

=IF(A1>1,"1",IF(A1<0,"0",A1))

NikolinoDE

I know I don't know anything (Socrates)

best response confirmed by Hemed09hs (Copper Contributor)
Solution

# Re: Functions

As variant

``=MAX( MIN( <result>, 1), 0 )``

# Re: Functions

I don't think that will work, cause I already have a very long formula in the cell with nested if. I tried to nest that condition with the formula and it gave me this:

There are one or more circular references where a formula refers to its own cell either directly or indirectly. This might cause them to calculate incorrectly.
Try removing or changing these references, or moving the formulas to different cell.

Or how should i use it

# Re: Functions

where should i put this, with the formula?

# Re: Functions

Thanks, this worked.
1 best response

Accepted Solutions
best response confirmed by Hemed09hs (Copper Contributor)
Solution

# Re: Functions

As variant

``=MAX( MIN( <result>, 1), 0 )``