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

[µo°Ý]±N¨â°}¦C¨Ì¶¶§Ç¦X¨Ö°ÝÃD

[µo°Ý]±N¨â°}¦C¨Ì¶¶§Ç¦X¨Ö°ÝÃD

¦U¦ì¤j¤j±z­Ì¦n
¦pªG·Q±N¨â°}¦C¨Ì¥Ñ¤p¦Ó¤j¶¶§Ç¦X¨Ö°ÝÃD
¦p¡G
A  8 4 6               B 7 5 3 9                C 3 4 5 6 7 8 9
    3 4 5                  4 2 1 3                   1 4 2 5 4 3 3
±NA¡AB¨â°}¦C¦X¨Ö¦¨C°}¦C¡A¨Ã±N¨ä¾l¬Û¹ïÀ³¸ê®Æ§Û¿ý¡A
À³¸Ó¦p¦ó¸Ñ¨M

·PÁ¦U¦ìªº¨ó§U
ASUS

¦^´_ 1# asus103
¦³¨Ç¼Æ­È¸ò§AA¡BB°}¦C¨ú±o¤è¦¡¦³Ãö
¥HÀx¦s®æ½d³ò¬°°}¦C¬°¨Ò
  1. Sub nn()
  2. Dim Ar(), Ay(), C(), A, B
  3. A = [B1:D2]: B = [F1:I2]
  4. For i = LBound(A, 1) To UBound(A, 1)
  5.    For j = LBound(A, 2) To UBound(A, 2)
  6.    ReDim Preserve Ar(s)
  7.    Ar(s) = A(i, j) '¨ú±oA°}¦C
  8.    s = s + 1
  9.    Next
  10.    For j = LBound(B, 2) To UBound(B, 2)
  11.    ReDim Preserve Ar(s)
  12.    Ar(s) = B(i, j) '¨ú±oB°}¦C
  13.    s = s + 1
  14.    Next
  15.    ReDim Ay(s)
  16.    For j = 0 To UBound(Ar)
  17.      Ay(j) = Application.Small(Ar, j + 1) '±Æ§Ç
  18.    Next
  19.    ReDim Preserve C(k)
  20.    C(k) = Ay: s = 0: Erase Ay '¥[¤J¸ê®Æ¨ìC°}¦C¡A§â¼È¦s°}¦C²M°£
  21.    k = k + 1
  22. Next
  23. [K1].Resize(k, UBound(A, 2) + UBound(B, 2)) = Application.Transpose(Application.Transpose(C))
  24. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

Hsieh¤j¤j±z¦n

§Ú³o¦¸ªº­«ÂI¸¨¦b¡y¨Ã±N¨ä¾l¬Û¹ïÀ³¸ê®Æ§Û¿ý¡z¡A¤]´N¬O²Ä2ºû¸ê®Æ­n¸òµÛ­ì¨Ó²Ä1ºû¸ê®Æ

­ì¥ý¤w¦³¤F¨â­Ó°}¦C(A¡BB)¦X¨Ö¦¨C¤§«á¡A²Ä1ºû«ö¥Ñ¤p¦Ó¤j¶¶§Ç¡A²Ä2ºû¶·¸òµÛ­ì¨Óªº²Ä1ºû
¨Ò¦p¡G
A°}¦C¬OA¯Zªº¦¨ÁZ¡B©m¦W¡AB°}¦C¬OB¯Zªº¦¨ÁZ¡B©m¦W
·Q­n«ö·Ó¦¨ÁZ°ª§C¦X¨Ö¦¨·s°}¦C¡A¦ý¦¨ÁZ¶·¹ï¨ì­ì¨Óªº¤H

·PÁ¤j¤jªº¦^ÂСA
¥Ñ¨ä¤¤§Ú­n¾Ç¨ì³B²z¤u§@ªí¸ê®Æ»P°}¦C¶¡ªº¤£¦P¤è¦¡©M·Qªk
ASUS

TOP

¦^´_ 3# asus103

¤£À´§A©Ò¿×
¨Ã±N¨ä¾l¬Û¹ïÀ³¸ê®Æ§Û¿ý
½Ð¤W¶Ç§Aªº½d¨Ò»¡©ú
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh
Hsieh¤j¤j±z¦n
¹ï¤£°_¡A¬O§ÚÃ㤣¹F·N
ªþ¤W½d¨ÒÀÉ
·PÁ±z
Book1.rar (12.24 KB)
ASUS

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-13 22:28 ½s¿è

¦^´_ 5# asus103
  1. Sub ex()
  2. Dim C()
  3. Open "test.txt" For Output As #1 '²£¥Í¼È¦sÀÉ
  4. A = [B1:D2]: B = [F1:I2]
  5. For i = LBound(A, 2) To UBound(A, 2)
  6. Print #1, A(1, i) & "," & A(2, i)
  7. Next
  8. For i = LBound(B, 2) To UBound(B, 2)
  9. Print #1, B(1, i) & "," & B(2, i)
  10. Next
  11. Close #1
  12. Shell "sort / " & "test.txt" & " /o " & "temp.txt" '²£¥Í±Æ§Ç¼È¦sÀÉ
  13. '°»´úª½¨ìÀɮײ£¥Í,¦AÄ~Äò«á­±ªº°Ê§@
  14. While Dir("temp.txt") = ""
  15. Wend
  16. Open "temp.txt" For Input As #1
  17. Do Until EOF(1)
  18. Line Input #1, mystr
  19. ReDim Preserve C(s)
  20. C(s) = Split(mystr, ",")
  21. s = s + 1
  22. Loop
  23. Close #1
  24. Kill "test.txt" '§R°£¼È¦sÀÉ
  25. Kill "temp.txt" '§R°£±Æ§Ç¼È¦sÀÉ
  26. [B12].Resize(2, s) = Application.Transpose(C)
  27. End Sub
½Æ»s¥N½X
sort«ü¥O¬OWindows­ì¥»´N¦³ªºDOS«ü¥O¡A¥Î©ó±Æ§Ç¯Â¤å¦rÀÉ¡C
¥H¤Wµ{¦¡³q¹LWindows7+Excel2010´ú¸Õ¡F
­Y¦b§Aªº¹q¸£°õ¦æ¦³»~¡A½Ð½T»{§Aªº¹q¸£¸Ì¦³ sort.exe ³o­Ó°õ¦æÀÉ¡C
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh
·PÁ±zHsieh¤j¤j
§Ú´ú¸Õ¹L¤Fwinxp¡Boffice2007¯à¥¿±`¤u§@
¸ò¤å¦rÀɶ¡ªº¤¬°Ê¬O§Ú¤§«e¤ñ¸û¤Ö¸I¡A¦ý¥¿¦n¬O§Ú¦Û¤v³W¹º¤U¤@¶¥¬qªº¾Ç²ß¥Ø¼Ð
§Ú»Ý­n¦hªá¤@ÂI®É¶¡¥h¬ã¨s¥L¡A­Y¦³°ÝÃD¦A¦V±z½Ð±Ð
·PÁ±z
ASUS

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-13 18:45 ½s¿è

¦^´_ 7# asus103
  1. Sub yy() '®ðªw±Æ§Ç
  2. Dim Ar(), Ay()
  3. A = [B1:D2]: B = [F1:I2]
  4. For Each y In Array(A, B)
  5. For i = LBound(y, 2) To UBound(y, 2)
  6. ReDim Preserve Ar(s)
  7. ReDim Preserve Ay(s)
  8.   Ar(s) = y(1, i)
  9.   Ay(s) = y(2, i)
  10.   s = s + 1
  11. Next
  12. Next
  13. For i = 0 To UBound(Ar)
  14.     For j = 0 To UBound(Ar) - 1
  15.        If Ar(j + 1) < Ar(j) Then '»¼¼W
  16.      'If Ar(j + 1) > Ar(j) Then  '»¼´î
  17.       temp = Ar(j)
  18.       temp1 = Ay(j)
  19.       Ar(j) = Ar(j + 1)
  20.       Ar(j + 1) = temp
  21.       Ay(j) = Ay(j + 1)
  22.       Ay(j + 1) = temp1
  23.       
  24.     End If
  25.     Next
  26. Next
  27. [B15].Resize(, s) = Ar
  28. [B16].Resize(, s) = Ay
  29. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ asus103 ©ó 2011-1-13 20:34 ½s¿è

¦^´_ 8# Hsieh
·PÁ±zHsieh¤j¤j
¤S´£¨Ñ§Ú¥t¤@­Ó«ä¦Ò¤è¦¡

¥i¥H¥t¥~¦A½Ð±Ð±z¦³Ãö"Delay"ªº¥Îªk¶Ü?
VBA»¡©ú§Ú¬Ý¤£¬ÆÀ´
¤£ª¾¹D¦p¦ó±±¨î©µ¿ð®É¶¡¡A
¦pªG¦b¤@¦^°é¤¤¨C¤@¦¸©µ¿ð0.5¬í¡A¨ä»yªk¬°¦ó
ÁÂÁÂ
ASUS

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-13 22:26 ½s¿è

¦^´_ 9# asus103
¤@¯ë¼Ò²Õ
  1. Declare Sub Sleep Lib "kernel32" (ByVal dwmilliseconds As Long) '«Å§iAPIªºSLEEP¨ç¼Æ
  2. Sub nn()
  3. t = Timer '¶}©l­p®É
  4. For i = 1 To 10
  5.   Sleep 500  '©µ¿ð500/1000¬í
  6. Next
  7. MsgBox "©µ¿ð" & Timer - t & "¬í"  "¨C¦¸©µ¿ð0.5¬í¡A¤Q¦¸©µ¿ð«á¦@©µ¿ð?¬í
  8. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤@¥y·Å·xªº¸Ü¡A´N¹³©¹§O¤H¨­¤WÅx­»¤ô¡A¦Û¤v·|ªg¨ì¨â¤Tºw¡C
ªð¦^¦Cªí ¤W¤@¥DÃD