- ©«¤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
|
¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-7-22 20:15 ½s¿è
¦^´_ 1# play9091 - Sub Ex()
- Dim D As Object, E As Variant
- Set D = CreateObject("Scripting.Dictionary") 'Dictionary¥Î©óÀx¦s¸ê®ÆÃöÁä¦r©M¶µ¥Ø¹ï¡C¡A³q±`¬O¾ã¼Æ©Î¦r¦ê¡A¥i¥H¬O°£°}¦C¥~ªº¥ô¦ó«¬ºA¡C
- For Each E In Sheet1.Range("A2").CurrentRegion.Rows 'Sheet1.A2³sÄò½d³ò¦Cªº¶°¦X
- If E.Cells(1).Interior.ColorIndex = 3 Then 'ColorIndex = 3 ¬õ¦â
- If Not D.EXISTS(E.Cells(1).Value) Then Set D(E.Cells(1).Value) = E
- 'Not D.EXISTS(E.Cells(1).Value) §ä¤£«½ÆªºÈ
- 'Set D(E.Cells(1).Value) = E : Dictionary.ITEMS->³]©w¬°Eªº¾ã¦C(Range ª«¥ó)
- End If
- Next
- For Each E In D.ITEMS
- Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1).Resize(, E.Columns.Count) = E.Value
- 'E.Columns.Count =>¶Ç¦^Eªº¾ã¦CªºÄæ¼Æ
- ' E.Copy Sheet2.Range("A" & Rows.Count).End(xlUp).Offset(1) 'copyªº¤èªk
- Next
- End Sub
½Æ»s¥N½X |
|