Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Serge
 
Posts: n/a
Default Trigonometry in Excel

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.
Many Thanks in advance.
Serge
  #2   Report Post  
Posted to microsoft.public.excel.misc
Jerry W. Lewis
 
Posts: n/a
Default Trigonometry in Excel

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

Jerry

"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.
Many Thanks in advance.
Serge

  #3   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph
 
Posts: n/a
Default Trigonometry in Excel

"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


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

Hello Jerry,
Thanks for your promt reply.
I agree with you. But in the formula shown, the end result is given in
Degrees which is what I want. In first exemple the included angle happens to
be less than 90 degrees.
In the second exemple the result for the included angle is grater than 90
degrees.

"Jerry W. Lewis" wrote:

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

Jerry

"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.
Many Thanks in advance.
Serge

  #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





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

Hello David,

Fantastic, your'e a genious.
Thank you very much. It works both ways.
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



  #7   Report Post  
Posted to microsoft.public.excel.misc
SiC
 
Posts: n/a
Default Trigonometry in Excel

Hi Serge,

There's nothing wrong with your formula. You used DEGREES() and RADIANS()
correctly. However, the limit for the ATAN function is from -90 to 90
degrees. Both DEGREES(ATAN(TAN(RADIANS(-24.01)))) and
DEGREES(ATAN(TAN(RADIANS(-155.99)))) will give you -24.01. That's just the
nature of the function. If you have to distinguish between -24.01 and
155.99, you just need to some adjustment in your formula. Basically you just
need to check if the value of (B51-A51*COS(RADIANS(C51))) is negative or not.
If it is negative, add 180 degrees to your answer. I trust that you can
figure out that part yourself. Good luck.

-Simon

"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.
Many Thanks in advance.
Serge

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

Hello Simon,
Thank you for your reply.
Your explanation is very appreciated.
I understand better now.
Thank you very much.
Serge





"SiC" wrote:

Hi Serge,

There's nothing wrong with your formula. You used DEGREES() and RADIANS()
correctly. However, the limit for the ATAN function is from -90 to 90
degrees. Both DEGREES(ATAN(TAN(RADIANS(-24.01)))) and
DEGREES(ATAN(TAN(RADIANS(-155.99)))) will give you -24.01. That's just the
nature of the function. If you have to distinguish between -24.01 and
155.99, you just need to some adjustment in your formula. Basically you just
need to check if the value of (B51-A51*COS(RADIANS(C51))) is negative or not.
If it is negative, add 180 degrees to your answer. I trust that you can
figure out that part yourself. Good luck.

-Simon

"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.
Many Thanks in advance.
Serge

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Open Excel 2003 from Windows Explorer pmpjr Excel Discussion (Misc queries) 9 September 11th 06 03:58 PM
Need suggestions for some uses of Ms Excel Bible John Excel Discussion (Misc queries) 1 February 27th 06 05:30 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Excel 2002 and 2000 co-install. Control Which Starts ? cnuk Excel Discussion (Misc queries) 2 January 17th 05 08:07 PM


All times are GMT +1. The time now is 04:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"