ì¸ê®Æ¦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
- 163
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 170
- ÂI¦W
- 0
- §@·~¨t²Î
- Window 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-5
- ³Ì«áµn¿ý
- 2022-7-20
|
¦^´_ 1# s7659109
½Ð°Ñ¦Ò- 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, 7), arr(i, 8), "", arr(i, 4))
- Next
- For Each Rng In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row)
- Rng.Offset(0, 1).Resize(1, 7) = d(Rng.Value)
- Next
- 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
|
¦pªG ¥u¬OnÄæ¦ì¶×¤J¡A¤£§PÂ_¡A¤U±n¦p¦ó§ï¡H
For Each Rng In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row)
Rng.Offset(0, 1).Resize(1, 7) = d(Rng.Value)
Next |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤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
|
§ï¦¨³o¼Ë¥i¹F¦¨²Ä2°ÝÃD¡A¦ý¦³§ó¦nªº¶Ü¡H
Sub test()
Dim arr1, arr2, r, rr
With Sheets("sheet1")
r = .Cells(.Rows.Count, 1).End(3).Row
arr1 = .Range("a1:H" & r)
arr2 = .Range("i1:q" & r)
End With
rr = Cells(Rows.Count, 1).End(3).Row
Range("A2:h" & rr).ClearContents
Range("R2:Z" & rr).ClearContents
[A1].Resize(r, 8) = arr1
[r1].Resize(r, 9) = arr2
End Sub |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤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-9-29 03:29 ½s¿è
¦^´_ 4# s7659109
§Ú¼gªº¤ñ¸ûªø¤@¨Ç¡A¦ý¬O§ó¦³"¼u©Ê"¡A¾Ç¸¹¤£³sÄò¤]µL©Ò¿×- Sub test()
- Dim tt$, Rn&, Cn&, Ri&, Ci&
- Dim ¸ê®Æ½d³ò As Range, ¶ñ¼g½d³ò As Range
- Set d = CreateObject("scripting.dictionary")
- Sheets("data").Activate
- Rn = Cells(Rows.Count, 1).End(xlUp).Row
- Cn = Cells(1, Columns.Count).End(xlToLeft).Column
- Set ¸ê®Æ½d³ò = [b2].Resize(Rn - 1, Cn - 1)
- '¿é¤J¸ê®Æ¨ì¦r¨å
- For Each rg In ¸ê®Æ½d³ò
- tt = Cells(1, rg.Column).Value
- tt = tt & "," & Cells(rg.Row, 1).Value
- d(tt) = rg.Value
- Next
- '==========§Ú¬O¤À®æ½u==========
- Sheets("test").Activate
- Ri = Cells(Rows.Count, 1).End(xlUp).Row
- Ci = Cells(1, Columns.Count).End(xlToLeft).Column
- Set ¶ñ¼g½d³ò = [b2].Resize(Ri - 1, Ci - 1)
- '±q¦r¨å¿é¥X¸ê®Æ
- For Each rg In ¶ñ¼g½d³ò
- tt = Cells(1, rg.Column).Value
- tt = tt & "," & Cells(rg.Row, 1).Value
- rg.Value = d(tt)
- Next
- End Sub
½Æ»s¥N½X
¨Ï¥Î数组©M¦r¨å1070929.rar (13.22 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-9-29 03:43 ½s¿è
¦^´_ 5# n7822123
ªøÂkªø¡A¦ý¬OÀ³¸Ó«Ü¦n²z¸Ñ
¦]¬°§AªºÀɮ׬O·sª©ªº".xlsm"¡A
¤£µM·Ç¤jÀ³¸Ó¦´N¦^§A¤F¡A
³o¸Ì«Ü¦h°ª¤â³£ÁÙ¦b¥Îª©excel¡A
¤U¦¸n§ÖÂI±o¨ìµª®×®É¡A«Øij¤W¶ÇªºÀÉ®×¥Î".xls"
¥H¤W¬O¤ß±o¤À¨É
:D
¥t¦sª©excel ¦p¤U¡A³o¼Ë´N¦³§ó¦h¤H¥[¤J°Q½×!
¨Ï¥Î数组©M¦r¨å1070929.rar (8.73 KB)
|
|
µ{¦¡¬O¨Ì»Ý¨D¼gªº¡A»Ý¨Dªí¹F¤£²M·¡
©ÎªÌ¨S¦³¤W¶Çªþ¥ó¡A·R²ö¯à§U
|
|
|
|
|
- ©«¤l
- 2839
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2895
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-12-22
|
¥»©«³Ì«á¥Ñ ã´£³¡ªL ©ó 2018-9-29 09:44 ½s¿è
Sub test2()
Dim R&, Ar, Br, xA As Range
Set xA = [data!a1]
R = xA(Rows.Count, 1).End(xlUp).Row - 1
Ar = Array(2, 3, 5, 6, 8) '¨Ó·½¸ê®Æn½Æ»sªº[Äæ¦ì]¶¶§Ç
Br = Array(2, 3, 7, 8, 4) 'n¶K¤Jªº[Äæ¦ì]¶¶§Ç
For i = 0 To UBound(Ar)
Cells(2, Ar(i)).Resize(R) = xA(2, Br(i)).Resize(R).Value
Next i
End Sub
ìÃD¬On¥Î[¦r¨å], ¬Ý¬Ý»Ý¨D, À³¸Ó¤£¥Î¦r¨å§Y¥i,
¥i¯à¥t¦³¥Î·N, ©Ò¥H¬Ý¤FÃD´Nºâ¤F~~ |
|
|
|
|
|
|
- ©«¤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
|
ÁÂÁ¤G¦ì¤j¤jÀ°¦£¡A°}¦C»P¦r¨å¨â¤j§Q¾¹¡A¯uªºnªá®É¶¡¤~¦³¿ìªk§l¦¬¡C |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤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
|
Set xA = [data!a1]
For i = 0 To UBound(Ar)
Cells(2, Ar(i)).Resize(R) = xA(2, Br(i)).Resize(R).Value
Next i
XA ªº¥Îªk¥i§_½Ðã¤j¸ÑÄÀ¡H |
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤l
- 2839
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2895
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-12-22
|
¦^´_ 9# s7659109
xA(2, Br(i)) µ¥¦P xA.CELLS(2, Br(i)) |
|
|
|
|
|
|