Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop excel from dropping the 0 in the beginning of a number? | Setting up and Configuration of Excel | |||
Open Excel 2003 from Windows Explorer | Excel Discussion (Misc queries) | |||
Need suggestions for some uses of Ms Excel | Excel Discussion (Misc queries) | |||
Excel Range Value issue (Excel 97 Vs Excel 2003) | Excel Discussion (Misc queries) | |||
Excel 2002 and 2000 co-install. Control Which Starts ? | Excel Discussion (Misc queries) |