- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 62
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2025-3-13
               
|
¦^´_ 1# luke - Sub ¿z¿ï()
- Set d = CreateObject("Scripting.Dictionary")
- With sheet1
- For Each a In .Range(.[B1], .Cells(.Rows.Count, 2).End(xlUp))
- If a.Interior.ColorIndex = 6 Then d(a.Value) = Array(a, a.Offset(, 1), a)
- Next
- With .Range("L1")
- .CurrentRegion = ""
- .Resize(d.Count, 3) = Application.Transpose(Application.Transpose(d.items))
- .Resize(d.Count, 3).Sort .Cells(1, 1), xlAscending, Header:=xlNo
- End With
- End With
- End Sub
- Sub ¨ú¥N()
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- With sheet1
- With .Range("L1").CurrentRegion
- For Each a In .Columns(1).Cells
- d(a.Value) = a.Offset(, 2)
- d1(a.Offset(, 2).Value) = a.Value
- Next
- End With
- For Each a In .Range(.[B1], .Cells(.Rows.Count, 2).End(xlUp))
- If d1.exists(a.Value) And a.Interior.ColorIndex <> 6 Then MsgBox "¸ê®Æ«½Æ": Exit Sub
- Next
- For Each a In .Range(.[B1], .Cells(.Rows.Count, 2).End(xlUp))
- If d.exists(a.Value) And a.Interior.ColorIndex = 6 Then a.Value = d(a.Value)
- Next
- MsgBox "¨ú¥N§¹¦¨"
- End With
- End Sub
½Æ»s¥N½X |
|