½Ð°Ý¦U¦ì¤j¤j ¦bexcel¤¤¦p¦ó¥H¼¶¼gVBA¨Ï±o¦Û°Ê¥H¬Y¯S©wÀx¦s®æ¤º®e©R¦W¨Ã¥t¦s·sÀÉ
- ©«¤l
- 1
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 2
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¤k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-9-9
- ³Ì«áµn¿ý
- 2010-9-16
|
½Ð°Ý¦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ªí³æ
|
|
|
|
|
|
- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ 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¨ì§Anªº©Ò¦³«°¥«¶¡ªº¶ZÂ÷(¤½¨½¼Æ)
¦Ü©ó VBA µ{¦¡ªº¤è¦¡¤jP¤W©p¤w¸g±NÃöÁ䪺³¡¤À¨q¥X¨Ó¤F,
¦sÀɪº¸Ü¥i¥H¥Î
for iI = 1 To 6
¦¹³Bpºâ¤½¨½¼Æ¨Ã©ñ¶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 |
|
|
|
|
|
|
- ©«¤l
- 472
- ¥DÃD
- 5
- ºëµØ
- 0
- ¿n¤À
- 485
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows
- ³nÅ骩¥»
- MS Office
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- »´ä
- µù¥U®É¶¡
- 2010-7-4
- ³Ì«áµn¿ý
- 2014-12-28
|
¦^´_ 1# LYL
hello,
¥i§_µo¤@¤U²{¦b§A¥Î¨Ó¹B¤@ÓÀɪº¥N½X?
¨ä¹ê°ò¥»¤W¦A¦b¤§¤W¦Û°Ê¦b¨C¤@ÓÀɹB¦æªº¥N½X´N¥i¥H¤F. |
|
|
|
|
|
|