|
本帖最后由 SHENQIAN 于 2015-12-2 13:26 编辑
Sub tt()
With Sheet2
.Cells.Clear
arr = [a1].CurrentRegion
For i = 2 To UBound(arr)
x = Val(arr(i, 1)): y = Val(arr(i, 2))
.Cells(x, y) = arr(i, 3)
If .Cells(x, y).Value = "1" Then
.Cells(x, y).Interior.ColorIndex = 4
ElseIf .Cells(x, y).Value = "2" Then
.Cells(x, y).Interior.Color = 3
ElseIf .Cells(x, y).Value = "3" Then
.Cells(x, y).Interior.Color = 5
ElseIf .Cells(x, y).Value = "5" Then
.Cells(x, y).Interior.Color = 6
ElseIf .Cells(x, y).Value = "6" Then
.Cells(x, y).Interior.Color = 7
ElseIf .Cells(x, y).Value = "8" Then
.Cells(x, y).Interior.Color = 9
End If
NeXT
.Activate
End With
End Sub
请各位帮我看一下这个有什么问题??
.Interior.Color
都换成成
.interior.colorindex
|
|