|
なんか理解不能っぽいのでUPしても意味が無いかもしれないけれど、
全部書いてみた。
Dim TB(1 To 24, 1 To 3) As Long
Dim i As Long, ii 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
TB(17, 1) = 140: TB(17, 2) = 4: TB(17, 3) = 216
TB(18, 1) = 186: TB(18, 2) = 132: TB(18, 3) = 168
TB(19, 1) = 248: TB(19, 2) = 255: TB(19, 3) = 159
TB(20, 1) = 168: TB(20, 2) = 242: TB(20, 3) = 246
TB(21, 1) = 247: TB(21, 2) = 209: TB(21, 3) = 167
TB(22, 1) = 205: TB(22, 2) = 113: TB(22, 3) = 133
TB(23, 1) = 81: TB(23, 2) = 48: TB(23, 3) = 45
TB(24, 1) = 252: TB(24, 2) = 252: TB(24, 3) = 28
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).Value <> "" Then
If Cells(i, ii).Value > 0 And Cells(i, ii).Value <= 24 Then
Num = Cells(i, ii)
Cells(i, ii).Interior.Color = RGB(TB(Num, 1), TB(Num, 2), TB(Num, 3))
End If
Else
'Exit For '途中の空白のところで終わらせたいなら(列方向に対して)
End If
Next
Next
|
|