- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 248
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-16
|
¦^´_ 15# li_hsien
¬O³o¼Ëªº·N«ä¶Ü?
YUSER¦³¹ï·Ó¨ìMATCH_A&B«h§ó·sMATCH_A&B
YµL¹ï·Ó¨ìMATCH_A&BÀ³«h·s¼WUSER¸ê®Æ¦C¨ìMATCH_A&B
YMATCH_A&B¸ê®Æ¥¼¥X²{¦bUSER«h«O¯d- Sub ex()
- Dim A As Range, Sh As Worksheet
- Set d = CreateObject("Scripting.Dictionary")
- For Each Sh In Sheets(Array("User A", "User B"))
- With Sh
- For Each A In .Range(.[C2], .[C2].End(xlDown))
- Debug.Print A
- d(A & A.Offset(, 1) & A.Offset(, 2)) = Array(A.Value, Sh.Name, A.Offset(, 1).Value, A.Offset(, -1).Value, A.Offset(, 2).Value, A.Offset(, 3).Value, "", A.Offset(, 4).Value)
- Next
- End With
- Next
- With Sheets("Match A & B")
- For Each A In .Range(.[A2], .[A2].End(xlDown))
- mystr = A & A.Offset(, 2) & A.Offset(, 4)
- If d.exists(mystr) Then A.Resize(, 8) = d(mystr): d.Remove mystr
- Next
- For Each ky In d.keys
- .Cells(.Rows.Count, 1).End(xlUp).Offset(1, 0).Resize(, 8) = d(ky)
- Next
- End With
- End Sub
½Æ»s¥N½X |
|