|
<p>Sub Macro1()<br/>Dim irow As Long<br/>With Sheets("考勤签到记录")<br/>irow = .UsedRange.Rows.Count</p><p> Range("A3:L3").Select<br/> Range(Selection, Selection.End(xlDown)).Select<br/> Selection.Sort Key1:=Range("C3"), Order1:=xlAscending, Header:=xlGuess, _<br/> OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _<br/> :=xlPinYin, DataOption1:=xlSortNormal</p><p> For i = 1 To irow<br/> If Trim(.Cells(3, i)) & Trim(.Cells(5, i)) = Trim(.Cells(3, i)) & Trim(.Cells(5, i)) Then<br/> .Rows("i:i").Select<br/> Selection.Delete<br/> ElseIf Trim(.Cells(3, i)) = "" Then<br/> MsgBox "完成!"<br/> End If<br/> Next i<br/>End With<br/>End Sub<br/></p> |
|