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

[µo°Ý] ½Æ»s¶W¯ÅºC°ÝÃD¨D±Ï

[µo°Ý] ½Æ»s¶W¯ÅºC°ÝÃD¨D±Ï

¥»©«³Ì«á¥Ñ spermbank ©ó 2015-12-22 23:42 ½s¿è

¤j®a¦n:

         §Ú·Q§Q¥Î"¤u§@ªí1"ªºAÄæ¥N¸¹¦Ü"­º­¶"¤Î"°ò¥»­±"·j´M½Æ»s(¥]§t­ì¥»¼Æ­È¡B®æ¦¡¤ÎÃC¦â)¬ÛÃö¸ê®Æ¦Ü"¤u§@ªí1"
         §Ú§Q¥Îoffice 2007¶]¡A³t«×¶W¯ÅºC¡A°_½X­n20-30¤ÀÄÁ¡A¥i¬O¥Îoffice 2010(¤£¦P¹q¸£¡A¹q¸£¤ñ¸û¦n)¶]¥u­n8-10¤ÀÄÁ
         °ò¥»¤W³£¥Îoffice 2007¶]¡A·Q½Ð±Ð¦U¦ì¤j¤j¡A³o­n¦p¦ó¸Ñ¨M(¦pªþ¥óÀÉ®×)¡A·PÁ¡C

test.rar (395.38 KB)

³o¬O§Úªºµ{¦¡½X³Â·Ð¤j¤jÀ°§Ú¬Ý¬Ý¡A·PÁ¡C
  1. Sub Macro1()


  2.     Sheets("¤u§@ªí1").Select
  3.     x1 = Application.WorksheetFunction.CountA(Range("A:A")) 'Äæ¦ì¦³­È½d³ò­p
  4. '================================================================
  5. '    iStart = Timer
  6. '================================================================
  7.    

  8.     For i = 2 To x1            '§Q¥Î¤u§@ªí1AÄæ¥N¸¹¦Ü­º­¶¡B°ò¥»­±´M§ä¬Û¹ï¥N¸¹
  9.         Range("C" & i).Formula = "=MATCH($A" & i & ",­º­¶!$A$1:$A$3000,)"
  10.     Next
  11.    
  12.    
  13.     Columns("C:C").Select       '±N¤½¦¡Âà´«¦¨­È
  14.     Selection.Copy
  15.     Range("C1").Select
  16.     Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
  17.         :=False, Transpose:=False
  18.     Application.CutCopyMode = False
  19.     Range("C1").Select




  20.     For i = 2 To x1     '§Q¥Î¤u§@ªí1CÄ檺­È¡A¦Ü­º­¶¤Î°ò¥»­±®»¨ú¬ÛÃö¸ê®Æ

  21.         GGG = Cells(i, "C")
  22.         Sheets("­º­¶").Range("F" & GGG & ":" & "P" & GGG).Copy Sheets("¤u§@ªí1").Range("D" & i & ":" & "N" & i)


  23.         Sheets("°ò¥»­±").Range("G" & GGG & ":" & "I" & GGG).Copy Sheets("¤u§@ªí1").Range("O" & i & ":" & "Q" & i)


  24.         Sheets("°ò¥»­±").Range("D" & GGG & ":" & "E" & GGG).Copy Sheets("¤u§@ªí1").Range("R" & i & ":" & "S" & i)


  25.         Sheets("°ò¥»­±").Range("E" & GGG & ":" & "E" & GGG).Copy Sheets("¤u§@ªí1").Range("T" & i & ":" & "T" & i)


  26.         Sheets("°ò¥»­±").Range("F" & GGG & ":" & "F" & GGG).Copy Sheets("¤u§@ªí1").Range("U" & i & ":" & "U" & i)

  27.     Next





  28. '================================================================
  29. '    iEnd = Timer
  30. '    Sheets("¤u§@ªí1").Select
  31. '    Cells(2, "F") = iEnd - iStart

  32. End Sub
½Æ»s¥N½X

TOP

2007¶]¡A³t«×¶W¯ÅºC¡A°_½X­n20-30¤ÀÄÁ¡H¡@

¤£¨ì¢³¢¯¢¯µ§¡AÀ³¤£­P¦p¦¹¤[¡I¡I¡I
°£«D¹ê»ÚÀɮפ¤ÁÙ¦³¨ä¥¦¤u§@ªí¡A¥B±a¦³¤j¶q¤½¦¡¡A³y¦¨¨C¶K¤@¦¸¸ê®Æ¡A§Y¦Û°Ê­«ºâ¤@¦¸¡I

¨Ï¥ÎUNION¶°¦¨¤§«á¦A¶K¸ê®Æ¡A·|§Ö«Ü¦h¡A¦ý©Ò¤W¶ÇªºÀɮפ¤¡A¤u§@ªí¢°ªº¢ÏÄæ¥N¸¹¦³«Ü¦h­«ÂСAµLªk¨Ï¥Î¦¹ªk¡I¡I

¥ý¸Õ¸Õ¥H¤U­×§ï½X¡]¥u­×§ï¢ÑÄæMATCH¤½¦¡¡^¡A¦bXP+2000¤¤¬ù¤@¤ÀÄÁ¥i¦¨¡]¢²¢·¢µ¦C¡^¡G
Sub Macro1()
Dim G&, TM, i&
TM = Time
Sheets("¤u§@ªí1").Select
x1 = Application.WorksheetFunction.CountA(Range("A:A"))
Range("D2:U" & x1).Clear
With Range("C2:C" & x1)
¡@¡@¡@.Formula = "=MATCH(A2,­º­¶!$A$1:$A$3000,)"
¡@¡@¡@.Value = .Value
End With
Application.ScreenUpdating = False
For i = 2 To x1
¡@¡@¡@G = Cells(i, "C")
¡@¡@¡@Sheets("­º­¶").Range("F" & G & ":" & "P" & G).Copy Sheets("¤u§@ªí1").Range("D" & i)   'D-N
¡@¡@¡@Sheets("°ò¥»­±").Range("G" & G & ":" & "I" & G).Copy Sheets("¤u§@ªí1").Range("O" & i) 'O-Q
¡@¡@¡@Sheets("°ò¥»­±").Range("D" & G & ":" & "E" & G).Copy Sheets("¤u§@ªí1").Range("R" & i)  'R-S
¡@¡@¡@Sheets("°ò¥»­±").Range("E" & G).Copy Sheets("¤u§@ªí1").Range("T" & i)
¡@¡@¡@Sheets("°ò¥»­±").Range("F" & G).Copy Sheets("¤u§@ªí1").Range("U" & i)
Next
MsgBox "§¹¦¨®É¶¡" & Format(Time - TM, "hh:mm:ss")
End Sub

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2015-12-23 11:15 ½s¿è

±N¢ÏÄæ­«ÂÐ¥N¸¹¥ý§R°£¡A¦A¸Õ¸Õ¡G¡]ª`·N¡G©Ò¦³ªí®æªº¥N¸¹¥²¶·¥ý±Æ§Ç¡^¡@
Sub Macro2()
Dim G&, TM, i&, xU(1 To 5) As Range, xR As Range, x1&
TM = Time
Sheets("¤u§@ªí1").Select
x1 = Application.WorksheetFunction.CountA(Range("A:A"))
Range("D2:U" & x1).Clear
¡@
With Range("C2:C" & x1)
¡@¡@¡@.Formula = "=MATCH(A2,­º­¶!$A$1:$A$3000,)"
¡@¡@¡@.Value = .Value
End With
¡@
Application.ScreenUpdating = False
For i = 2 To x1
¡@¡@G = Cells(i, "C")
¡@¡@Set xR = Sheets("­º­¶").Range("F" & G & ":" & "P" & G)
¡@¡@If i = 2 Then Set xU(1) = xR Else Set xU(1) = Union(xU(1), xR)
¡@
¡@¡@Set xR = Sheets("°ò¥»­±").Range("G" & G & ":" & "I" & G)
¡@¡@If i = 2 Then Set xU(2) = xR Else Set xU(2) = Union(xU(2), xR)
¡@¡@   
¡@¡@Set xR = Sheets("°ò¥»­±").Range("D" & G & ":" & "E" & G)
¡@¡@If i = 2 Then Set xU(3) = xR Else Set xU(3) = Union(xU(3), xR)
    ¡@
¡@¡@Set xR = Sheets("°ò¥»­±").Range("E" & G)
¡@¡@If i = 2 Then Set xU(4) = xR Else Set xU(4) = Union(xU(4), xR)
    ¡@
¡@¡@Set xR = Sheets("°ò¥»­±").Range("F" & G)
¡@¡@If i = 2 Then Set xU(5) = xR Else Set xU(5) = Union(xU(5), xR)
Next
¡@
For i = 1 To 5
¡@¡@xU(i).Copy Range(Array("D2", "O2", "R2", "T2", "U2")(i - 1))
Next i
MsgBox "§¹¦¨®É¶¡" & Format(Time - TM, "hh:mm:ss")
End Sub

TOP

¦^´_ 4# ­ã´£³¡ªL

­ã´£³¡ªL ±z¦n:

    ¦³¨S¦³¿ìªk¤£§R°£AÄæ­«½Æ¥N¸¹¤Î­«·s±Æ¦C¤è¦¡¤U§¹¦¨©O?
    ¨S¦³¨q¥X§¹¾ãµ{¦¡¡A¦ý­«½Æ¥N¸¹¤Î©Ò¦b¦ì¸m¦³¨ä·N¸q¡A·PÁ¡C

TOP

¨Ï¥Î¡e°Ï¬q¡f³B²z¡A¢ÑÄæ¡e±q¤p¨ì¤j¡f¬°¤@­Ó°Ï¬q¡G
Sub °õ¦æ()
Dim G&, TM, i&, j%, R&
TM = Time
Sheets("¤u§@ªí1").Select
R = Cells(Rows.Count, 1).End(xlUp).Row
With Range("C2:C" & R): .Formula = "=MATCH(A2,­º­¶!A$1:A$3000,)": .Value = .Value: End With
Application.ScreenUpdating = False
Dim xU(1 To 4) As Range, xR(1 To 4) As Range, X&, N&
X = 1: N = 2
RE_GET:
For i = X + 1 To R
¡@¡@G = Cells(i, "C")
¡@¡@Set xR(1) = [­º­¶!F1:P1].Offset(G - 1, 0)
¡@¡@Set xR(2) = [°ò¥»­±!G1:I1].Offset(G - 1, 0)
¡@¡@Set xR(3) = [°ò¥»­±!D1:E1].Offset(G - 1, 0)
¡@¡@Set xR(4) = [°ò¥»­±!E1:F1].Offset(G - 1, 0)
¡@¡@For j = 1 To 4
¡@¡@¡@¡@If xU(j) Is Nothing Then Set xU(j) = xR(j) Else Set xU(j) = Union(xU(j), xR(j))
¡@¡@Next j
¡@¡@If G >= Cells(i + 1, "C") Then X = i: Exit For
Next
For j = 1 To 4
¡@¡@xU(j).Copy Range(Array("D1", "O1", "R1", "T1")(j - 1)).Cells(N, 1)
¡@¡@Set xU(j) = Nothing: Set xR(j) = Nothing
Next j
N = X + 1
If X < R Then GoTo RE_GET
MsgBox "§¹¦¨®É¶¡" & Format(Time - TM, "hh:mm:ss")
End Sub

ªþÀɤU¸ü¡G
Xl0000231.rar (231.44 KB)
¡@

TOP

¥»©«³Ì«á¥Ñ spermbank ©ó 2015-12-23 16:23 ½s¿è

¦^´_ 6# ­ã´£³¡ªL


    ­ã´£³¡ªL ±z¦n:

     ½Ð°Ý¤@¤U¨ú°Ï¬q³Ì¤p®É¡A¤u§@ªí1³£·|¼Ð¥ÜA¦ÜCÄæ³Ì¤p¬°¶À©³¦â¡A³o¶À©³¦â¯à°÷®³±¼¶Ü??
     ¦]¬°©³¦âµù°O¡AÁÙ¦³¨ä¥L¥Î³~¡A±qµ{¦¡¬Ý¤£¥X¨Ó«ç»ò®³±¼¡A·PÁ¡C

     ¥t¥~¡A§Úªºµ{¦¡¬O
     Sub test()
         .
         .(¤W¬qµ{¦¡)(¦³§PÂ_¦¡¤l¡Bµ¹Àx¦s®æÃC¦â)
         .
         ½Æ»s³¡¤À(¤¤¬qµ{¦¡)
         .
         .(¤U¬qµ{¦¡)(¦P¤@¤À­¶¦³¹Bºâ)
         .
     endsub

     ¤W¬qµ{¦¡¡B¤¤¬qµ{¦¡¡B¤U¬qµ{¦¡³£¨Ì§Ç³B²z¡A³o¼Ë¤l¯uªº·|¼vÅT½Æ»s³¡¤À§r¡A¥i¬O§Ú¤£ª¾¹D¬°¤°»ò?

TOP

¦^´_ 7# spermbank


¨º©³¦â¬O¡e®æ¦¡¤Æ±ø¥ó¡f¡A²M°£§Y¥i¡A»Pµ{¦¡µLÃö¡ã¡ã
¥u¯à´£¨Ñ½Æ»s³¡¥÷¡A
©Ò´£¤W¤U¬qµ{¦¡¬O§_¦³¬Û½Ä¬ð©Î¼vÅT¡AµLªk§PÂ_¡A½Ð¦Û¦æ¥ý®M¬Ý¬Ý¡ã¡ã

TOP

¦^´_ 8# ­ã´£³¡ªL

Ok,·PÁ·PÁÂ^^

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD