Results 1 to 11 of 11
Thread: Excell - Radians Deg Min Sec
Hybrid View
-
9th March 2011 16:46 #1
Excell - Radians Deg Min Sec
() Excell .
http://support.microsoft.com/kb/213449
Function Convert_Degree(Decimal_Deg) As Variant
With Application
'Set degree to Integer of Argument Passed
Degrees = Int(Decimal_Deg)
'Set minutes to 60 times the number to the right
'of the decimal for the variable Decimal_Deg
Minutes = (Decimal_Deg - Degrees) * 60
'Set seconds to 60 times the number to the right of the
'decimal for the variable Minute
Seconds = Format(((Minutes - Int(Minutes)) * 60), "0")
'Returns the Result of degree conversion
'(for example, 10.46 = 10~ 27 ' 36")
Convert_Degree = " " & Degrees & " " & Int(Minutes) & "' " _
& Seconds + Chr(34)
End With
End Function
, . , .
, Excell , .

---------- 16:46 ---------- 16:27 ----------
, :
A1...
=IF(A1<0;"-"&Convert_Degree((-1*A1));Convert_Degree(A1)), ...
, ?!?
-
9th March 2011 17:32 #2Code:
Convert_Degree(abs(A1))
: XaMaB; . 0.42
In God we Trust (all others must submit a X.509 certificate). , ()
-
9th March 2011 21:17 #3Registered User
Join Date: Oct:2003
Location:
Posts: 4,317
-
9th March 2011 19:06 #4
, :
=IF(A1<0;Convert_Degree((2*pi+A1));Conve rt_Degree(A1))
, abs(A1)<=2*pi;
----------------------------------------------------------
, .Last edited by finalista; 9th March 2011 at 22:43.
-
9th March 2011 21:44 #5
.
:
-45 = (360-45) = 315;
-π/4 = (2*π-π/4) = (7/4)*π;
, .
-
10th March 2011 09:45 #6Registered User
Join Date: Aug:2009
Location:
Posts: 265
:
Code:=IF(A1<0;"-";"")&TEXT(ABS(A1)/24;"[hh] mm' ss''")
-
10th March 2011 13:44 #7
, :
Function Convert_Degree(Decimal_Deg) As Variant
, , ,
, ,
-
10th March 2011 16:07 #8
-
10th March 2011 14:58 #9Registered User
Join Date: Aug:2009
Location:
Posts: 265
, *180/PI() .
-
10th March 2011 15:26 #10
-
10th March 2011 22:22 #11
, , .
PI, #VALUE! .Code:Function Rads_to_Degs(Rad) As Variant With Application 'Convert rdians into Decimal degrees Decimal_Deg = Rad * 180 / 3.14159265358979 'PI ≈ 3.1415926535897932384626433832795 'Set degree to Integer of Argument Passed Degrees = Int(Abs(Decimal_Deg)) 'Set minutes to 60 times the number to the right 'of the decimal for the variable Decimal_Deg Minutes = (Abs(Decimal_Deg) - Degrees) * 60 'Set seconds to 60 times the number to the right of the 'decimal for the variable Minute Seconds = Format(((Minutes - Int(Minutes)) * 60), "0") 'Returns the Result of degree conversion '(for example, 10.46 = 10~ 27 ' 36") Dgr = 0 If (Decimal_Deg < 0) Then Dgr = -Degrees Else Dgr = Degrees Rads_to_Degs = " " & Dgr & " " & Int(Minutes) & "' " _ & Seconds + Chr(34) End With End FunctionLast edited by finalista; 10th March 2011 at 23:23.




Reply With Quote


Lenovo ThinkPad 15 IdeaPad 15
5th May 2023, 22:16 in