Dim rng As Range, i As Integer, t$
With CreateObject("scripting.dictionary")
For Item = 2 To Cells(Rows.Count, 1).End(xlUp).Row
桥稿慎 t = Cells(Item, 1).Value & "@" & Cells(Item, 2).Value & "@" & Cells(Item, 4).Value & "@" & Cells(Item, 5).Value
If .exists(t) Then
If rng Is Nothing Then
Set rng = Cells(Item, 1).Resize(1, 5)
Else
Set rng = Union(rng, Cells(Item, 1).Resize(1, 5))
End If
Else
敏敬敬伏.Add t, ""
End If
Next
End With
If Not rng Is Nothing Then rng.Interior.ColorIndex = 3
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range) '选区改变时If Selection.Rows.Count = 1 And Selection.Columns.Count = 256 And Cells(ActiveCell.Row, 1) = 1 Then '选中整行,并且该行第一列值为 1
旅御 颂镇猛 Range(Cells(ActiveCell.Row, 1), Cells(ActiveCell.Row, 256)).Interior.Color = 野桥RGB(0, 255, 0) '整行单元格颜色为绿色(RGB 0,255,0)
End If
End Sub
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)