- ©«¤l
- 21
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 35
- ÂI¦W
- 0
- §@·~¨t²Î
- winXP
- ³nÅ骩¥»
- 1.0
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-8-4
- ³Ì«áµn¿ý
- 2018-3-8

|
¦^´_ 2# GBKEE
ÁÂÁ±zªº¦^µª §Úè¸Õ¤F¤@¤U ¥i¥H¥Î ¤£¹L§Úµo²{¦³¥t¤@Ó°ÝÃD
¥ÎӪѥN¸¹¡B¶i³õ¤é´Á¨Ó±Æ§Ç
§R°£¦CÀ³¸Ó¬O2Ó±ø¥ó
1. ·í¤é»P¤U¤@¤é ӪѦWºÙ¤@¼Ë & ¥X³õ¤é¤@¼Ë
2. ӪѦWºÙ¤@¼Ë ·í¤é¶i³õÁÙ¨S¥X³õ ¤U¤@µ§´N¶i³õ ³o¬O¤£¹ïªº (§Ú¬Q¤Ñ§Ñ¤F¦Ò¼{¨ì³oÓ)
è¦Û¤v§ï¤F§ï À³¸Óok ¥u¬Oµ{¦¡¼gªº¦³ÂIÁà
ÁÙ±æ½Ð§A«üÂI¤@¤G
Sub Ex()
Dim i As Integer, Rng As Range
'With ActiveSheet 'Sheets("sheet1")
With Sheets("§ë¸ê¶×Á`ªí")
.UsedRange.Sort Key1:=.Range("A2"), Order1:=xlAscending, Key2:=.Range( _
"C2"), Order2:=xlAscending, Header:=xlYes
i = 2
Do While .Cells(i, "E") <> ""
If (.Cells(i, "b") & .Cells(i, "E") = .Cells(i + 1, "b") & .Cells(i + 1, "E")) Then
If Rng Is Nothing Then
Set Rng = .Cells(i, "E").Offset(1)
Else
Set Rng = Union(Rng, .Cells(i, "E").Offset(1))
End If
End If
i = i + 1
Loop
If Not Rng Is Nothing Then
Rng.EntireRow.Delete
' §Ú¦Û¤v¼gªº ¥Dn¬O³B²z¦Ò¼{ÂI2
i = 2
Do While .Cells(i, "E") <> ""
If .Cells(i, "b") = .Cells(i + 1, "b") Then
If .Cells(i, "E") > .Cells(i + 1, "C") Then
.Rows(i + 1).Delete Shift:=xlUp
i = i - 1
End If
End If
i = i + 1
Loop
.UsedRange.Sort Key1:=.Range("C2"), Order1:=xlAscending, Key2:=.Range( _
"A2"), Order2:=xlAscending, Header:=xlYes
End If
End With
End Sub |
|