主页 > 数据处理 > EXCEL中如何实现角度度分秒的输入以及数据处理?

EXCEL中如何实现角度度分秒的输入以及数据处理?

2022-04-27 18:23来源:m.sf1369.com作者:宇宇

  MicroSoftFAQConvertingDecimalDegreestoDegrees/Minutes/SecondsFunctionConvert_Degree(Decimal_Deg)AsVariantWithApplication\'SetdegreetoIntegerofArgumentPassedDegrees=Int(Decimal_Deg)\'Setminutesto60timesthenumbertotheright\'ofthedecimalforthevariableDecimal_DegMinutes=(Decimal_Deg-Degrees)*60\'Setsecondsto60timesthenumbertotherightofthe\'decimalforthevariableMinuteSeconds=Format(((Minutes-Int(Minutes))*60),0)\'ReturnstheResultofdegreeconversion\'(forexample,10。
  46=10~27\'36)Convert_Degree=&Degrees&°&Int(Minutes)&\'_&Seconds+Chr(34)EndWithEndFuncti (A1)ConvertingDegrees/Minutes/SecondstoDecimalDegreesFunctionConvert_Decimal(Degree_DegAsString)AsDouble\'Declarethevariablestobedoubleprecisionfloating-point。
  DimdegreesAsDoubleDimminutesAsDoubleDimsecondsAsDouble\'Setdegreetovaluebefore° grees=Val(Left(Degree_Deg,InStr(1,Degree_Deg,°)-1))\'Setminutestothevaluebetweenthe°andthe\'\'ofthetextstringforthevariableDegree_Degdividedby\'60。
  TheValfunctionconvertsthetextstringtoanumber。
  minutes=Val(Mid(Degree_Deg,InStr(1,Degree_Deg,°)+2,_InStr(1,Degree_Deg,\')-InStr(1,Degree_Deg,_°)-2))/60\'Setsecondstothenumbertotherightof\'thatis\' conds=Val(Mid(Degree_Deg,InStr(1,Degree_Deg,\')+_2,Len(Degree_Deg)-InStr(1,Degree_Deg,\')-2))_/3600Convert_Decimal=degrees+minutes+secondsEndFunctionExample:=Convert_Decimal(10°27\'36)。

相关推荐

车联网企业国内有哪些?

数据处理 2023-12-23

注册计量师-请教贴

数据处理 2023-12-19

逆光照片怎么处理

数据处理 2023-12-08