View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming
 
Posts: n/a
Default brainteaser: change a value by 90 (but answer must lie between 0-1


wrote:

bpeltzer wrote:

=mod(a1+90,180) will constrain the sum of a1 and 90 to the range of 0-180.



Thanks you - that's excellent.

but how do i contrain sum from 1 to 180 (not 0 to 180)

(so 90 degrees becomes 180 instead of 0)


Sorry - ignore this comment . Ron did it correctly:
=MOD(A1+90,180)+(MOD(A1+90,180)=0)*180

Ron if you have time, please can you explain your formula (if possible)