- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 112
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-5-9
               
|
¦^´_ 8# YUPOYU
¤£¬O¼Ò²Õ¦ì¸mªºÃö«Y¡A¬O§AªºÄæ¦ì°_©l¦ì¸m¤£¦P- Sub ex()
- Set d = CreateObject("Scripting.Dictionary")
- With Sheet1
- For j = 8 To .[IV5].End(xlToLeft).Column
- For i = 5 To .[G65536].End(xlUp).Row
- If d(.Cells(i, j).Value) = "" Then
- d(.Cells(i, j).Value) = .Cells(i, 7)
- Else
- d(.Cells(i, j).Value) = d(.Cells(i, j).Value) & "," & .Cells(i, 7)
- End If
- Next
- Next
- ay = Split(Join(d.items, ","), ",")
- End With
- With Sheet2
- For Each a In .Range(.[A2], .[IV2].End(xlToLeft))
- If d(a.Value) <> "" Then
- If mystr = "" Then
- mystr = d(a.Value)
- Else
- mystr = mystr & "," & d(a.Value)
- End If
- End If
- Next
- ar = Split(mystr, ",")
- .[A3].Resize(UBound(ar) + 1, 1) = Application.Transpose(ar)
- End With
- End Sub
½Æ»s¥N½X |
|