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

­ì¸ê®Æ¦p¦ó¥Î¦r¨å©î¤À¡A¤J¤£³sÄòªºÄæ¦ì

­ì¸ê®Æ¦p¦ó¥Î¦r¨å©î¤À¡A¤J¤£³sÄòªºÄæ¦ì

½Ð°Ý³o¤@¬q¦p¦ó§ï
Sub test() '¦r¨å»P¼Æ²Õ
Dim arr
    Set d = CreateObject("scripting.dictionary")
    Dim lastrow&
    lastrow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
    arr = Sheet3.Range("a1:h" & lastrow)
    For i = 2 To UBound(arr)
'        d(arr(i, 1)) = Array(arr(i, 2), arr(i, 3), arr(i, 4), arr(i, 5), arr(i, 6), arr(i, 7), arr(i, 8))
        d(arr(i, 1)) = Array(arr(i, 2), arr(i, 3), arr(i, 4), arr(i, 6), arr(i, 7), arr(i, 8))
    Next
    For Each Rng In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row)
        Rng.Offset(0, 1).Resize(1, 8) = d(Rng.Value)
    Next
End Sub

¦r¨å1070913.zip (12.99 KB)

§Æ±æ¤ä«ù!

¦^´_ 21# s7659109

¤£¥Î¦r¨åª«¥ó
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Rng As Range, S As Variant, Ar(), Arr(), i As Long, ii As Integer
  4.     With Sheets("test")
  5.         Set Rng = .Range("b1:" & .Cells(1, Columns.Count).End(xlToLeft).Address) 'test¤WªºÄæ¦ì
  6.         Ar = Application.Transpose(Application.Transpose(Rng))
  7.         For i = 1 To Rng.Cells.Count
  8.             S = Application.Match(Rng(i), Sheets("data").Rows(1), 0)
  9.             Ar(i) = IIf(IsError(S), "", S)  '¸m¤Jtest¤WªºÄæ¦ì¦bdata¤WªºÄ渹
  10.         Next
  11.         Set Rng = .Range("a2:" & .Cells(Rows.Count, 1).End(xlUp).Address).Resize(, Rng.Columns.Count + 1)
  12.         Arr = Rng
  13.     End With
  14.     For i = 1 To UBound(Arr)
  15.         S = Application.Match(Arr(i, 1), Sheets("data").Columns(1), 0)
  16.         If Not IsError(S) Then    'test¤Wªº¾Ç¸¹¦bdata¤Wªº¦ì¸m
  17.             For ii = 1 To UBound(Ar) '¾É¤Jtest¤WªºÄæ¦ì¦bdata¤WªºÄ渹
  18.              If Ar(ii) <> "" Then Arr(i, ii + 1) = Sheets("data").Cells(S, Ar(ii))
  19.             Next
  20.         End If
  21.     Next
  22.     Rng.Value = Arr
  23. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

ªüÀs¤j¡G
§Ö¦h¤F¡A0.34¬í
§Æ±æ¤ä«ù!

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-4 11:25 ½s¿è

¦^´_ 18# s7659109

À³¸Ó¤£¬O·í¤F¡A3¸Uµ§­n°õ¦æ¤@¬q®É¶¡!
¦r¨åª«¥óªºkey¿é¤J¦r¦ê«¬ºA¥i´£¤É³t«×(³o¤]¬O¸ò·Ç¤j¾Ç²ßªº)
test1 ¤£»Ý­×§ï
µ{§Ç test2­×§ï¦p¤U

Sub test2()
Set d = CreateObject("scripting.dictionary")
Dim Rn&, Cn&, arr, tt$
Sheets("data").Activate
Rn = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
Cn = Cells(1, Columns.Count).End(xlToLeft).Column
For C = 2 To Cn
  tt = Cells(1, C).Value
  d(tt) = Cells(2, C).Resize(Rn - 1, 1)
Next C
Sheets("test").Activate
Cn = Cells(1, Columns.Count).End(xlToLeft).Column
For C = 2 To Cn
  tt = Cells(1, C).Value
  Cells(2, C).Resize(Rn - 1, 1) = d(tt)
Next C
End Sub

¨Ï¥Î&#25968;&#32452;©M¦r¨å1071004.rar (8.64 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¦^´_ 13# s7659109

Ar = Array(1, 2, 3, 4, 5, 6, 7, 8, 18, 19, 20, 21, 22, 23, 24, 25, 26)
Br = Array(1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19)

¦pªG¬O¹³¤W­±³o¼Ë[¨â¬q¦¡]ªº³sÄòÄæ¦ì:
Cells(2, 1).Resize(R, 8) = xA(2, 1).Resize(R, 8).Value
Cells(2, 18).Resize(R, 9) = xA(2, 11).Resize(R, 9).Value

TOP

ªüÀs¤j¡G
µ§¼Æ30000µ§¡A·í¤F¡C
§Æ±æ¤ä«ù!

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-4 01:33 ½s¿è

¦^´_ 16# s7659109


½Ð¨Ï¥Î§Aªþ¥ó¸Ì­±ªº "test2"µ{§Ç!

test1 »P test2 ³£¥i¥H²Å¦X§Aªº»Ý¨D¡A¤£¦P¼gªk
test1 ³Ì¼u©Ê¡A¾Ç¸¹¤]¤£³sÄò¤]¥i¥H!

sheet2.test µ{§Ç¬O§A¦Û¤v­ì¥»ªº!
¦³ÂIµL¨¥.....

«öAlt+F8
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ s7659109 ©ó 2018-10-3 08:27 ½s¿è

ªüÀs¤j¡G
¸g´ú¸Õµ²ªG¡A¤´¹F¤£¨ì¹w´Á¡A¦pªþÀÉ¡C

¨Ï¥Î&#25968;&#32452;©M¦r¨å1071003.zip (12.75 KB)

§Æ±æ¤ä«ù!

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-2 23:25 ½s¿è

¦^´_ 14# n7822123


ÆF¥ú¤@°{¡A³o¼ËÀ³¸Óº¡·N¤F§a!?
µ{§Ç:test2
  1. Sub test2()
  2. Set d = CreateObject("scripting.dictionary")
  3. Dim Rn&, Cn&, arr
  4. Sheets("data").Activate
  5. Rn = Sheet2.Cells(Rows.Count, 1).End(xlUp).Row
  6. Cn = Cells(1, Columns.Count).End(xlToLeft).Column
  7. For C = 2 To Cn: d(Cells(1, C).Value) = Cells(2, C).Resize(Rn - 1, 1): Next C
  8. Sheets("test").Activate: Cn = Cells(1, Columns.Count).End(xlToLeft).Column
  9. For C = 2 To Cn: Cells(2, C).Resize(Rn - 1, 1) = d(Cells(1, C).Value): Next C
  10. End Sub
½Æ»s¥N½X
¨Ï¥Î&#25968;&#32452;©M¦r¨å1071002+.rar (12.29 KB)
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-2 22:33 ½s¿è

¦^´_ 13# s7659109


   ¨Ó·½¸ê®Æ»P­n¶K¤Jªº¸ê®Æ¡A»Ý­n«Ø¥ß1-1¹ïÀ³Ãö«Y

   ¦pªG¨S¦³³W«ßªº¸Ü¡AÀ³¸Ó¬O¨S¿ìªk¥ÎÅܼƨú¥Nªº

  °£«D­n¼g§PÂ_¦¡§ä¥X2­Ó¤u§@ªíªº¹ïÀ³Ãö«Y¡A³o¼Ë´N¸ò§Aªº©RÃD:¤£»Ý§PÂ_½Ä¬ð¤F¡C
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U

TOP

        ÀR«ä¦Û¦b : §Ñ¥\¤£§Ñ¹L¡A§Ñ«è¤£§Ñ®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD