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

¸ê®ÆÄæ¦ì¤¤-¨â¨â°t¹ï(¤w¸Ñ¨M)

¸ê®ÆÄæ¦ì¤¤-¨â¨â°t¹ï(¤w¸Ñ¨M)

¥»©«³Ì«á¥Ñ jimmuLu ©ó 2011-6-2 16:59 ½s¿è

§Ú·Q±NÄæ¦ì¤¤ªº¸ê®Æ(¼Æ¶q·|ÅܤÆ)¡A¨â¨â°t¹ï¡A¤£ª¾¸Ó¦p¦ó¼g°_?

¦³ÂI¹³¬OCn¨ú2---n¬°10¡A«h¦³10*(10-1)/2=45²Õ

³Â·Ð¤j®a¤F

¨â¨â°t¹ïCn¨ú2.zip (3.95 KB)

=n*(n-1)/2

TOP

¦^´_ 2# ANGELA


    ¤j¤j©êºp¡AÃD·N¨S»¡²M·¡

¸ê®Æ¦bAÄæ¡A§Ú·Q¦bCÄæ¤ÎDÄæ¤À§O±N©Ò¦³°t¹ï±¡§Î¦C¥X¡A

³Â·Ð¤F!!:D

TOP

  1. Sub chin()
  2. Dim s, i%, j%, k%, arr()
  3. s = [a1:a10]
  4. For i = 1 To 9
  5. For j = i + 1 To 10
  6. k = k + 1
  7. ReDim Preserve arr(1 To 2, 1 To k)
  8. arr(1, k) = s(i, 1): arr(2, k) = s(j, 1)
  9. Next: Next
  10. [c1].Resize(k, 2) = Application.Transpose(arr)
  11. End Sub
½Æ»s¥N½X

TOP

ÁÂÁÂCHIN15

¤£ª¾¥i§_¦Û°Ê°»´úAÄ椧¼Æ¶q¡A¦Ó¤£¥Î¨ìVBA¥h§ï¼Æ¶q

ÁÂÁÂÅo

TOP

  1. Sub nn()
  2. For Each a In Range([A1], [A65536].End(xlUp).Offset(-1, 0))
  3.     For Each b In Range(a.Offset(1, 0), [A65536].End(xlUp))
  4.     r = r + 1
  5.     Range(Cells(r, 5), Cells(r, 6)) = Array(a.Value, b.Value)
  6.     Next
  7. Next
  8. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh


    ÁÂÁÂHsieh¤j¤j¡A¤j·§¬Ý±oÀ´¡A¦ý¬O¦³¨Ç¬O¤º«Øªº«ü¥O©Î¨ç¼Æ´N¤£¤ÓÀ´¤F

¥i§_½Ð¤j¤j»¡©ú¤@¤U

3Qs

TOP

¦^´_ 7# jimmuLu


    Sub nn()
For Each a In Range([A1], [A65536].End(xlUp).Offset(-1, 0))'°j°é½d³ò±q²Ä¤@­ÓÀx¦s®æ¶}©l¡A¨ìAÄæ³Ì«áÀx¦s®æ©¹¤W§ä¨ì¸ê®Æ¡A¦A©¹¤W¤@®æ¡A´N¬O³Ì«á²Ä¤Gµ§
    For Each b In Range(a.Offset(1, 0), [A65536].End(xlUp))'°j°é±q²Ä¤@­Ó°j°éÅܼƪº¤U¤@®æ¶}©l¡A¨ì¸ê®Æµ²§ô
    r = r + 1
    Range(Cells(r, 5), Cells(r, 6)) = Array(a.Value, b.Value)'¨Ì§Ç¶ñ¤JE:FÄæ
    Next
Next
End Sub
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤Hªº²´·úªø¦b«e­±¡A¥u¬Ý¨ì§O¤Hªº¯ÊÂI¡Aµ·²@¬Ý¤£¨ì¦Û¤vªº¯ÊÂI¡C
ªð¦^¦Cªí ¤W¤@¥DÃD