Sub Macro1()
Range("A1:W3432").Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:= _
Range("D2"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom, SortMethod:=xlStroke, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal
Range("C2").Select
While (ActiveCell.Value <> Empty)
If ActiveCell.Value <> ActiveCell.Offset(1, 0).Value Then
ActiveCell.Offset(1, 0).Select
Else
If ActiveCell.Offset(0, 1).Value <> ActiveCell.Offset(1, 1).Value Then
Else
ActiveCell.Offset(0, 18).Value = "重覆選課"
End If
ActiveCell.Offset(1, 0).Select
End If
Wend
End Sub
>即時新聞-熱門
2009年8月14日星期五
EXCEL VBA - 找出重覆值
订阅:
博文评论 (Atom)
0 评论:
发表评论