|
Private Sub CommandButton1_Click()<br/>Dim i%, x&, j&, s%, a&, b&, y, c, m&<br/>Application.ScreenUpdating = False<br/>c = Timer<br/>x = 60000: a = 1: b = 200<br/>For i = 1 To x / 200<br/> For j = a To b<br/> s = Cells(j, 1).Value<br/> y = WorksheetFunction.CountIf(Range(Cells(a, 1), Cells(b, 1)), s)<br/> If y = 1 Then<br/> Range("a" & j).Font.ColorIndex = 5<br/> Range("a" & j).Interior.ColorIndex = 6<br/> End If<br/> Next j<br/> a = a + 200: b = b + 200<br/>Next i<br/>MsgBox "计算完毕,共用了" & Format(Timer - c, "0.000") & "秒"<br/>Application.ScreenUpdating = True<br/>End Sub<br/> |
|