|
↓色の数と合わせること。
Dim TB(1 To 16, 1 To 3) As Long
TB(1, 1) = 0: TB(1, 2) = 0: TB(1, 3) = 0
TB(2, 1) = 255: TB(2, 2) = 0: TB(2, 3) = 0
TB(3, 1) = 0: TB(3, 2) = 255: TB(3, 3) = 0
TB(4, 1) = 0: TB(4, 2) = 0: TB(4, 3) = 255
TB(5, 1) = 0: TB(5, 2) = 100: TB(5, 3) = 90
TB(6, 1) = 255: TB(6, 2) = 0: TB(6, 3) = 180
TB(7, 1) = 100: TB(7, 2) = 25: TB(7, 3) = 100
TB(8, 1) = 0: TB(8, 2) = 25: TB(8, 3) = 100
TB(9, 1) = 0: TB(9, 2) = 25: TB(9, 3) = 0
TB(10, 1) = 0: TB(10, 2) = 255: TB(10, 3) = 100
TB(11, 1) = 230: TB(11, 2) = 25: TB(11, 3) = 100
TB(12, 1) = 29: TB(12, 2) = 71: TB(12, 3) = 29
TB(13, 1) = 255: TB(13, 2) = 71: TB(13, 3) = 29
TB(14, 1) = 0: TB(14, 2) = 71: TB(14, 3) = 29
TB(15, 1) = 203: TB(15, 2) = 97: TB(15, 3) = 17
TB(16, 1) = 117: TB(16, 2) = 1071: TB(16, 3) = 103
・
・
略(手抜き)配列にするとわかりづらいですね。すみません。
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
For ii = 1 To Cells(i, 256).End(xlToRight).Column
If Cells(i, ii) <> "" Then
Num = Cells(i, ii)
Cells(i, ii).Interior.Color = RGB(TB(Num, 1), TB(Num, 2), TB(Num, 3))
Cells(i, ii).Select
End If
Next
Next
|
|