Hi,

I need the shortest possible array formula to create an output array B given an input array A so that each element of B is

0 if the corresponding element of A is < 0,
1 if the corresponding element of A is >0
equal to the corresponding element of A when that is between 0 and 1

example: if A is -2 ; 0,5 ; 3 then B would be 0; 0,5; 1

I have come up with this formula which is too long for my task (considering that the input array A is quite a long array formula itself..)

={IF(arrayA <0; 0 ; IF(arrayA >1; 1; arrayA)}

I would like to have some trick like the MAX/MIN combo which doesn't work with arrays unfortunately... something like this where I have to repeat arrayA (the long input formula) only once

=MAX(0;MIN(arrayA;1))

Any idea ?

Thanks for your support and sorry for my english

Paolo

Italy