将角度显示为度分秒以及转换计算

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

MicroSoft FAQ Converting Decimal Degrees to Degrees/Minutes/Seconds Function Convert_Deg

onds Function Convert_Degree(Decimal_Deg) As Variant With Application 'Set degree to Integer o

ger of Argument Passed Degrees = Int(Decimal_Deg) 'Set minutes to 60 times the number to the right 'o

ght 'of the decimal for the variable Decimal_Deg Minutes = (Decimal_Deg - Degrees) * 60 'Set seconds t

nds to 60 times the number to the right of the 'decimal for the variable Minute Seconds = Format(((Minut

Minutes - Int(Minutes)) * 60), "0") 'Returns the Result of degree conversion '(for example, 10.46 = 10~ 27

0~ 27 ' 36") Convert_Degree = " " & Degrees & "° " & Int(Minutes) & "' " _ & Seconds + Chr(34) End With

With End Function Example: A1 =10.6 B1 = Convert_Degree(A1) Converting Degrees/Minutes/Seconds

conds to Decimal Degrees Function Convert_Decimal(Degree_Deg As String) As Double ' Declare the va

he variables to be double precision floating-point. Dim degrees As Double Dim minutes As Double Dim s

Dim seconds As Double ' Set degree to value before "°" of Argument Passed. degrees = Val(Left(Degree

egree_De

相关文档
最新文档