ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

½Ð°Ý¦U¦ì¤j¤j ¦bexcel¤¤¦p¦ó¥H¼¶¼gVBA¨Ï±o¦Û°Ê¥H¬Y¯S©wÀx¦s®æ¤º®e©R¦W¨Ã¥t¦s·sÀÉ

½Ð°Ý¦U¦ì¤j¤j ¦bexcel¤¤¦p¦ó¥H¼¶¼gVBA¨Ï±o¦Û°Ê¥H¬Y¯S©wÀx¦s®æ¤º®e©R¦W¨Ã¥t¦s·sÀÉ

¦U¦ì¤j¤j

             ¤p©f¹Á¸Õ¦h¦¸¨ÌµM¥¢±Ñ·Q½Ð°Ý¦p¦ó±NªþÀɤ¤¨Ì§Ç±N¤C­Ó¿¤¥«(Sheet1)¤¤ªº¸g½n«×(X, YÄæ)¦U§O¹ï¤C­Óºô®æ(Sheet2)¤¤ªº¤¤¤ßÂI¸g½n«×(X,YÄæ)§Q¥Î²¦¤ó©w²z¨D¶ZÂ÷¡A±µµÛÂà´«¦¨¤½¨½¨Ã¥t¦s¦¨¤@­Ó·sÀÉ
¤]´N¬O³Ì«á·|¦³¤C­ÓÀÉ¡A¦ý¦]¬°¹ê»Ú¤W¦³¤@¤d¦h­Ó¿¤¥«¡A§Æ±æ¯à°÷§Q¥Î¥¨¶°©ÎVBAµ{¦¡¤@¦¸°õ¦æ¤@¤d¦hµ§¸ê®Æ¤£¥Î¤@­Ó­Ó°õ¦æµ{¦¡¦sÀÉ¡A¤p©f²{¦b¥Îªºµ{¦¡¬°
1.
Public Function slength(x1 As Integer, y1 As Integer, x2 As Integer, y2 As Integer)
slength = ((x1 - x2) ^ 2 + (y1 - y2) ^ 2) ^ 0.5 '²¦¤ó©w²z
End Function
2.
Public Function km(degree)
km = degree * 110   '¸g½n«×¶ZÂ÷Âऽ¨½
End Function

§Æ±æ¯à°÷Àò±o¸Ñµª   ÁÂÁÂ

¿¤¥«¸ê®Æ.rar (7.19 KB)

excelªí³æ

¦^´_ 1# LYL

hello,
    ¥i§_µo¤@¤U²{¦b§A¥Î¨Ó¹B¤@­ÓÀɪº¥N½X?
¨ä¹ê°ò¥»¤W¦A¦b¤§¤W¦Û°Ê¦b¨C¤@­ÓÀɹB¦æªº¥N½X´N¥i¥H¤F.
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2010-9-10 00:41 ½s¿è

¦pªG§A«æµÛ­n±o¨ì¬ÛÃö¼Æ¾Úªº¸Ü,§Ú´£¨Ñ¤@­Ó¸û²³æªº¤è¦¡ :

¥H¤U±Ô­z¤¤Àx¦s®æ H ~ M ¤À§O¹ïÀ³¨ì Sheets(Sheet2) ªº 2 ~ 7 ¦C©Ò¥Nªíªº«°¥«

H2=POWER(POWER(($F2-Sheet2!$B$2),2)+POWER(($G2-Sheet2!$C$2),2),0.5)*110
I2=POWER(POWER(($F2-Sheet2!$B$3),2)+POWER(($G2-Sheet2!$C$3),2),0.5)*110
.
.
.
M2==POWER(POWER(($F2-Sheet2!$B$7),2)+POWER(($G2-Sheet2!$C$7),2),0.5)*110

Mark H2 ~ M2 «á¦A©¹¤U½Æ»s§Y¥i±o¨ì§A­nªº©Ò¦³«°¥«¶¡ªº¶ZÂ÷(¤½¨½¼Æ)



¦Ü©ó VBA µ{¦¡ªº¤è¦¡¤j­P¤W©p¤w¸g±NÃöÁ䪺³¡¤À¨q¥X¨Ó¤F,
¦sÀɪº¸Ü¥i¥H¥Î
  for iI = 1 To 6

    ¦¹³B­pºâ¤½¨½¼Æ¨Ã©ñ¶i¬ÛÃöªºÀx¦s®æ¤º

    sFileName = Sheets("Sheet2").Cells(iI + 1 , 1) '°²³]¥H Sheets("Sheet2").[A2]  ~ [A7] ¤º®e¬°ÀɦW

    With Sheets("Sheet1")
      Application.DisplayAlerts = False
      .Copy
      With ActiveWorkbook
         .SaveAs sFileName
         .Close
      End With
      Application.DisplayAlerts = True
    End With
  Next iI
À³¸Ó¤£·|¦³¤°»ò°ÝÃD¤~¬O

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD