excel vba合并内容填充单元格颜色
发布网友
发布时间:2023-09-17 16:12
我来回答
共1个回答
热心网友
时间:2024-12-04 17:49
Sub s()
Dim d(1 To 6) As Object
For i = 1 To 6
Set d(i) = CreateObject("scripting.dictionary")
Next
n = Cells(Rows.Count, 3).End(3).Row
arr = Cells(n - 19, 3).Resize(20, 4)
For j = 1 To 3
For k = j + 1 To 4
x = x + 1
For i = 1 To 20
d(x)(arr(i, j) & arr(i, k)) = ""
Next
Next
Next
For i = 1 To 6
For j = 1 To 10
For k = 17 To 26
If d(i).exists(Cells(k, i * 10 + j).Text) Then Cells(k, i * 10 + j).Interior.ColorIndex = 6
Next: Next: Next
End Sub