ì¸ê®Æ¦p¦ó¥Î¦r¨å©î¤À¡A¤J¤£³sÄòªºÄæ¦ì
- ©«¤l
- 248
- ¥DÃD
- 76
- ºëµØ
- 0
- ¿n¤À
- 331
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- kaohsiung
- µù¥U®É¶¡
- 2013-6-10
- ³Ì«áµn¿ý
- 2020-7-3
|
ì¸ê®Æ¦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 |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 21# s7659109
¤£¥Î¦r¨åª«¥ó- Option Explicit
- Sub Ex()
- Dim Rng As Range, S As Variant, Ar(), Arr(), i As Long, ii As Integer
- With Sheets("test")
- Set Rng = .Range("b1:" & .Cells(1, Columns.Count).End(xlToLeft).Address) 'test¤WªºÄæ¦ì
- Ar = Application.Transpose(Application.Transpose(Rng))
- For i = 1 To Rng.Cells.Count
- S = Application.Match(Rng(i), Sheets("data").Rows(1), 0)
- Ar(i) = IIf(IsError(S), "", S) '¸m¤Jtest¤WªºÄæ¦ì¦bdata¤WªºÄ渹
- Next
- Set Rng = .Range("a2:" & .Cells(Rows.Count, 1).End(xlUp).Address).Resize(, Rng.Columns.Count + 1)
- Arr = Rng
- End With
- For i = 1 To UBound(Arr)
- S = Application.Match(Arr(i, 1), Sheets("data").Columns(1), 0)
- If Not IsError(S) Then 'test¤Wªº¾Ç¸¹¦bdata¤Wªº¦ì¸m
- For ii = 1 To UBound(Ar) '¾É¤Jtest¤WªºÄæ¦ì¦bdata¤WªºÄ渹
- If Ar(ii) <> "" Then Arr(i, ii + 1) = Sheets("data").Cells(S, Ar(ii))
- Next
- End If
- Next
- Rng.Value = Arr
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 248
- ¥DÃD
- 76
- ºëµØ
- 0
- ¿n¤À
- 331
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- kaohsiung
- µù¥U®É¶¡
- 2013-6-10
- ³Ì«áµn¿ý
- 2020-7-3
|
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ 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
¨Ï¥Î数组©M¦r¨å1071004.rar (8.64 KB)
|
|
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-26
|
¦^´_ 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 |
|
|
|
|
|
|
- ©«¤l
- 248
- ¥DÃD
- 76
- ºëµØ
- 0
- ¿n¤À
- 331
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- kaohsiung
- µù¥U®É¶¡
- 2013-6-10
- ³Ì«áµn¿ý
- 2020-7-3
|
ªüÀs¤j¡G
µ§¼Æ30000µ§¡A·í¤F¡C |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ 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
|
|
|
|
|
- ©«¤l
- 248
- ¥DÃD
- 76
- ºëµØ
- 0
- ¿n¤À
- 331
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- XP
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- kaohsiung
- µù¥U®É¶¡
- 2013-6-10
- ³Ì«áµn¿ý
- 2020-7-3
|
¥»©«³Ì«á¥Ñ s7659109 ©ó 2018-10-3 08:27 ½s¿è
ªüÀs¤j¡G
¸g´ú¸Õµ²ªG¡A¤´¹F¤£¨ì¹w´Á¡A¦pªþÀÉ¡C |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-2 23:25 ½s¿è
¦^´_ 14# n7822123
ÆF¥ú¤@°{¡A³o¼ËÀ³¸Óº¡·N¤F§a!?
µ{§Ç:test2- Sub test2()
- Set d = CreateObject("scripting.dictionary")
- Dim Rn&, Cn&, arr
- 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: d(Cells(1, C).Value) = 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: Cells(2, C).Resize(Rn - 1, 1) = d(Cells(1, C).Value): Next C
- End Sub
½Æ»s¥N½X
¨Ï¥Î数组©M¦r¨å1071002+.rar (12.29 KB)
|
|
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U
|
|
|
|
|
- ©«¤l
- 406
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 453
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS 7
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2015-2-7
- ³Ì«áµn¿ý
- 2021-7-31
|
¥»©«³Ì«á¥Ñ n7822123 ©ó 2018-10-2 22:33 ½s¿è
¦^´_ 13# s7659109
¨Ó·½¸ê®Æ»Pn¶K¤Jªº¸ê®Æ¡A»Ýn«Ø¥ß1-1¹ïÀ³Ãö«Y
¦pªG¨S¦³³W«ßªº¸Ü¡AÀ³¸Ó¬O¨S¿ìªk¥ÎÅܼƨú¥Nªº
°£«Dn¼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
|
|
|
|
|