View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Serge
 
Posts: n/a
Default Trigonometry in Excel

Hello David,
Thanks for your promt reply.
Will this revision work both ways (less than and great than 90 degrees)?
Serge
"David Biddulph" wrote:

"Jerry W. Lewis" wrote in message
...

"Serge" wrote:

A51=25.0
B51=21.5407
C51=42.03 Degrees
In E51
=IF(OR(A51="",B51="",C51=""),0,DEGREES(ATAN(A51*SI N(RADIANS(C51))/(B51-A51*COS(RADIANS(C51))))))
The answer is 79.935 Degrees
The formula above works well because the result is less than 90 Degrees
But in the next scenario:
A51=76.673
B51=47.214
C51=9.50 Degrees
I get -24.01 Degrees The answer should be 155.99 Degrees.

Can someone help with this one.


Excel's trig functions work in radians, not degrees. See Help for the
DEGREES() and RADIANS() functions.


He's dealt with the conversion between degrees and radians, Jerry.

The problem is that ATAN returns an angle in the range -pi/2 to +pi/2
radians, not between 0 and +pi, so if we want a positive angle we need to
use
=IF(OR(A51="",B51="",C51=""),0,MOD(DEGREES(ATAN(A5 1*SIN(RADIANS(C51))/(B51-A51*COS(RADIANS(C51))))),180))
--
David Biddulph