已知点A(1,2)和点B(3,-6)坐标,在Excel中把A点的坐标输入A1和B1,B点的坐标输入A3和B3,计算点A到点B的方位角,公式编写如下:方法一:“度”格式:=(PI()*(1-SIGN(B3-$B$1)/2)-ATAN((A3-$A$1)/(B3-$B$1)))*180/PI()“度分秒”格式:=INT((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI())&-&INT(((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()-INT((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()))*60)&-&INT((((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()-INT((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()))*60-INT(((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()-INT((PI()*(1-SIGN(B3-$b$1)/2)-ATAN((A3-$a$1)/(B3-$b$1)))*180/PI()))*60))*600)/10上面的计算出来的是度分秒格式,也就是字符串格式,不能用来计算,只是用来看的哟!=INT(C1)&-&INT((C1-INT(C1))*60)&-&INT(((C1-INT(C1))*60-INT((C1-INT(C1))*60))*600)/10求距离公式:=Round(SQRT(POWER((A3-$A$1),2)+POWER((B3-$B$1),2)),3)方法二:(本人编写的计算方法)可在C1单元格中输入以下公式进行计算(“度”格式):=Degrees(Atan2(A1-A3,B1-B3)+Pi())注:以上公式也可在其它单元格中编写,此处只是为了后续公式的编写。“度分秒”格式:在以“度”为单位的方位角已经在C1中算出的情况下,公式编写如下:=INT(C1)+INT((C1-INT(C1))*60)/100+(C1*60-INT(C1*60))*60/10000也就是:=INT(Degrees(Atan2(A1-A3,B1-B3)+Pi()))+INT((Degrees(Atan2(A1-A3,B1-B3)+Pi())-INT(Degrees(Atan2(A1-A3,B1-B3)+Pi())))*60)/100+(Degrees(Atan2(A1-A3,B1-B3)+Pi())*60-INT(Degrees(Atan2(A1-A3,B1-B3)+Pi())*60))*60/10000求距离公式:=Round(SQRT((A3-A1)^2+(B3-$B$1)^2),3)