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

[µo°Ý] ½Ð°Ý¦p¦ó¨Ï¥ÎVBA­pºâ¤è°}

[µo°Ý] ½Ð°Ý¦p¦ó¨Ï¥ÎVBA­pºâ¤è°}

§Ú·Q½Ð°Ý¦³¤@­Ó¨ÒÃD¡A¤w¸g±N¨â¨âªº¤¤¤ß¨D¥X¡A
¨Ò¦p:nµ§¸ê®Æ(A,B)
²Ä¤@µ§¸ê®Æ(5,5)
²Ä¤Gµ§¸ê®Æ(6,6)
¥ý­pºâ±o1¸ò2ªº¤¤¤ß¬°(5.5  ,  5.5)
¦Ó¦b¯x°}¤W¹ï·Ó1¸ò2ªº­pºâ¤½¦¡¬° (²Ä¤@µ§¸ê®ÆA-(12ªºA¥­§¡))^2+(²Ä¤Gµ§¸ê®ÆA-(12ªºA¥­§¡))^2+(²Ä¤@µ§¸ê®ÆB-(12ªºB¥­§¡))^2+(²Ä¤Gµ§¸ê®ÆB-(12ªºB¥­§¡))^2
¤£¬O«Ü·|±Ô­z¡A¤£ª¾¹D³o¼Ë¦³¨S¦³¤ñ¸û²M·¡
ªþ¥ó¤º¬O§Ú¥Î¤â¥´ªº¤è°}¡A¦]¬°ªáªº®É¶¡¤ñ¸ûªø¡A·Q½Ð°Ý¯à§_¥ÎVBAÁYµu®É¶¡
¤è°}.rar (8.64 KB)

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-7-28 20:43 ½s¿è

¦^´_ 1# linlin00

§Ú§Q¥Î¤W¦¸ªºµ{¦¡¨Ó§¹¦¨¥¦¡I
¤]´N¬O­ì¨ÓªºA¡BB¡BC 3Ä檺­ì¦³¸ê®Æ¨Ó§¹¦¨
  1. Public Sub Ex()
  2. s = 2
  3. k = 11
  4. For i = 2 To 6
  5.     X = i + 1
  6.     For j = X To 7
  7.         Cells(s, "F") = Cells(i, 1) & "," & Cells(j, 1)
  8.         Cells(s, "G") = (Cells(i, 2) + Cells(j, 2)) / 2
  9.         Cells(s, "H") = (Cells(i, 3) + Cells(j, 3)) / 2
  10.         Cells(j, k) = (Cells(i, 2) - Cells(s, "G")) ^ 2 _
  11.                          + (Cells(j, 2) - Cells(s, "G")) ^ 2 _
  12.                          + (Cells(i, 3) - Cells(s, "h")) ^ 2 _
  13.                          + (Cells(j, 3) - Cells(s, "h")) ^ 2
  14.         s = s + 1
  15.     Next
  16.     k = k + 1
  17. Next
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# lpk187
ÁÂÁÂlpk187¤jªº¦^µª¡A¦³´X­Ó¦a¤è·Q¦b½Ð°Ý¤@¤U
³o¸Ì¬°¬Æ»ò»Ý­n¥Î¤@­Ók?¬°¤°»òk»Ý­n¥ý³]¬°11?

TOP

¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-7-29 01:18 ½s¿è

¦^´_ 3# linlin00

K­È¬°¤°»ò­n11¦p¤U¹Ï
K­È¬°Column¼Æ¡A±qKÄæ¶}©l­p¼Æ©Ò¥H¬°11¡ALÄ欰12¡A¨Ì¦¹Ãþ±À¡I
   

¥H¦¹¨ÒÃD¡A¨ä¹ê¦³«Ü¦h¤è¦¡¥i¥H°µ¡A¦ý§Ú¿ï¾Ü³Ì°ò¦ªº¤@ºØ¤è¦¡¡AÅý§A®e©ö²z¸Ñ¡A³o¤è¦¡¦pªG¸ê®Æ«Ü¦hªº®É­Ô¡A¨ä¹ê³t«×·|¦³¨ÇºCªº¡I

TOP

¦^´_ 4# lpk187
«Ü®e©ö©ú¥Õªº¸ÑÄÀ¡A«D±`·PÁÂ!!
¦A½Ð±Ð¤@¤U¡A§Ú¿é¤J«áKªº¦ì¸m·|µo¥Í½sĶ¿ù»~¡A³o­Ó°ÝÃD¸Ó¦p¦ó±Æ°£?

TOP

§Úªº¸ê®Æ¦hªº®É­Ô¦h¥b·|¶W¹L1000µ§¡A½Ð°Ý¦³¿ìªkÅý³o­Óµ{¦¡°õ¦æ±o§ó§Ö¶Ü?

TOP

¦^´_ 5# linlin00

§ó¥¿¡AKªº³¡¤À°ÝÃD¤w¸g¸Ñ¨M¤F!

TOP

¦^´_ 6# linlin00

¤£ª¾¬O¤£¬O§A·Q­nªº
¨ä¹ê¥u¬O§â¥¦¥H°}¦Cªº¤è¦¡¥h¶](°}¦C¤ñ¦bÀx¦s®æ¶]§Ö«Ü¦h)
  1. Public Sub Ex1()
  2. Dim ar1(), ar2()
  3. n = 1
  4. arr = Range("a2:c" & Cells(Rows.Count, 1).End(xlUp).Row) '·íABC¤TÄ橹¤U¼W¥[¸ê®Æ®É·|¦Û°ÊŪ¨ú¦ì¸m
  5. ReDim ar2(1 To UBound(arr) + 1, 1 To UBound(arr) + 1)
  6. ar2(1, 2) = 1
  7. For i = 1 To UBound(arr) - 1
  8.     ar2(1, i + 2) = i + 1
  9.     X = i + 1
  10.     For j = X To UBound(arr)
  11.         ReDim Preserve ar1(1 To 3, 1 To n)
  12.         ar1(1, n) = arr(i, 1) & "," & arr(j, 1)
  13.         ar1(2, n) = (arr(i, 2) + arr(j, 2)) / 2
  14.         ar1(3, n) = (arr(i, 3) + arr(j, 3)) / 2
  15.         ar2(j, 1) = j - 1
  16.         ar2(j + 1, i + 1) = (arr(i, 2) - ar1(2, n)) ^ 2 _
  17.                       + (arr(j, 2) - ar1(2, n)) ^ 2 _
  18.                       + (arr(i, 3) - ar1(3, n)) ^ 2 _
  19.                       + (arr(j, 3) - ar1(3, n)) ^ 2
  20.         n = n + 1
  21.     Next
  22. Next
  23. ar2(j, 1) = i
  24. Range("F2").Resize(UBound(ar1, 2), UBound(ar1, 1)) = Application.Transpose(ar1)
  25. Range("J1").Resize(UBound(ar2, 2), UBound(ar2, 1)) = ar2
  26. End Sub
½Æ»s¥N½X

TOP

¦^´_ 8# lpk187
ÁÂÁ¡A³o­Ó³t«×Åܫܧ֡A¦Ó¥B¤]¯à±o¨ì§Ú·Q­nªºµ²ªG¡A¤£¹L¦h¤F¦n¦h§Ú¤£À´ªºªF¦èÁٻݭnªáÂI®É¶¡§l¦¬.....

TOP

¦^´_ 2# lpk187

§Ú¥Ø«e¨Ï¥Î³o¤@­Ó¨Ó¾Þ§@¡A·Q½Ð°Ý¦pªG­n§ä¤è°}½d³ò¤ºªº³Ì¤p­È¨Ã¦^¶Ç¬O­þ¨â­Óªº²Õ¦X¡A¦³¿ìªk°µ¨ì¶Ü?
¤U¤@¨B·Q­n±N³o¤@­Ó³Ì¤p­Èªº¨â²Õ°µµ²¦X¡A±µµÛºâ·sªº¤@­Ó¤è°}

TOP

        ÀR«ä¦Û¦b : ¸Ü¦h¤£¦p¸Ü¤Ö¡A¸Ü¤Ö¤£¦p¸Ü¦n¡C
ªð¦^¦Cªí ¤W¤@¥DÃD