|
- Sub 按钮1_Click()
- Set d = CreateObject("scripting.dictionary")
- Application.ScreenUpdating = False
- arr = ActiveSheet.UsedRange
- For j = 1 To UBound(arr)
- If Len(arr(j, 11)) > 0 Then d(arr(j, 11)) = ""
- Next j
- Set Rng = Nothing
- For j = 1 To UBound(arr)
- For i = 1 To 9
- If d.exists(arr(j, i)) Then
- If Rng Is Nothing Then
- Set Rng = Cells(j, i)
- Else
- Set Rng = Union(Rng, Cells(j, i))
- End If
- End If
- Next i
- Next j
- If Not Rng Is Nothing Then Rng.Interior.ColorIndex = 3
- Application.ScreenUpdating = True
- End Sub
复制代码 |
|