ì¸ê®Æ¦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
|
|
§Æ±æ¤ä«ù!
|
|
|
|
|
- ©«¤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 |
|
|
|
|
|
|