|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
- Sub test()
- Dim r%, i%
- Dim arr, brr
- Dim d As Object
- Set d = CreateObject("scripting.dictionary")
- With Worksheets("sheet4")
- r = .Cells(.Rows.Count, 1).End(xlUp).Row
- .Range("c2:c" & r).Interior.ColorIndex = 0
- arr = .Range("a1:c" & r)
- For i = 1 To UBound(arr)
- xm = arr(i, 1) & "+" & arr(i, 2)
- If Not d.exists(xm) Then
- d(xm) = i
- Else
- m = d(xm)
- If arr(i, 3) <> arr(m, 3) Then
- .Cells(i, 3).Interior.ColorIndex = 6
- End If
- End If
- Next
- End With
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|