J

#### John

below:

Hi there,

I'm trying to use the ATAN2 function to return an ordered list of dynamic

connector shapes' angles. To do this I've add a user cell to the shape's

shapesheet with the following:

ATAN2((EndY-BeginY),(EndX-BeginX))

Thinking of a clock face this starts at 3 o'clock and runs anti-clockwise

from 0-180 degrees to 9 o'clock. From 9 to 3 o'clock it becomes negative

(ie -180 to 0).

So, I want to convert the negative numbers to their positve equivelant, such

as -90 + 360 = 270 degrees. So, the formula below should work:

=IF(ATAN2((EndY-BeginY),(EndX-BeginX))<0,(ATAN2((EndY-BeginY),(EndX-BeginX))+360),ATAN2((EndY-BeginY),(EndX-BeginX)))

........but it doesn't! (NB- For -45 deg it returns 20581.4 deg). Can anyone

tell me why?

Thanks

John