- ©«¤l
- 559
- ¥DÃD
- 58
- ºëµØ
- 0
- ¿n¤À
- 626
- ÂI¦W
- 0
- §@·~¨t²Î
- win8
- ³nÅ骩¥»
- office2013
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- TW
- µù¥U®É¶¡
- 2010-11-22
- ³Ì«áµn¿ý
- 2024-6-14
|
¦^´_ 4# Hsieh
Dear ¤j¤j
§Ú¥Î¤@ӫܲªº¤è¦¡¨Ó³B²z·íDATAµL¸ê®Æ®É,©Ò²£¥Íªº°ÝÃD
¤£ª¾¹D¤j¤j¬O§_¦³¨ä¥L¤è¦¡
³o¬O§Ú¥Î¤j¤jªºµ{¦¡½Xקï (¬õ¦â¬°§Ú·s¼Wªº¦a¤è)
Dim Ay()
Set d = CreateObject("Scripting.Dictionary")
With Sheet2
ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 2))
If UBound(ar, 1) = 0 Or UBound(ar, 1) = 65536 - 4 Then
For i = 1 To 1
mystr1 = Join(Application.Index(ar, i))
d(mystr1) = d.Count
Next
Else For i = 1 To UBound(ar, 1)
mystr1 = Join(Application.Index(ar, i))
d(mystr1) = d.Count
Next
End If With Sheet1
ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 6))
For i = 1 To UBound(ar, 1)
mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
If d.exists(mystr1) = False Then
ReDim Preserve Ay(s)
Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
s = s + 1
End If
Next
End With
If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
End With |
|