Occasional Contributor

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


If the value is in A1...



Hope I could help you with these information.



I know I don't know anything (Socrates)

best response confirmed by Hemed09hs (Occasional Contributor)


As variant

=MAX( MIN( <result>, 1), 0 )
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
where should i put this, with the formula?
Thanks, this worked.