|
▼チロ さん
こんな感じのニュアンスなのでしょうか
For R1 = 11 To 74
For C1 = 5 To 34
With Cells(R1, C1)
.Interior.ColorIndex = xlNone
If .Value = Cells(1, 5) Then .Interior.ColorIndex = 7 '塗りつぶしをピンク
If .Value = Cells(1, 6) Then .Interior.ColorIndex = 46 '塗りつぶしをオレンジ
If .Value = Cells(1, 7) Then .Interior.ColorIndex = 6 '塗りつぶしを黄色
If .Value = Cells(1, 8) Then .Interior.ColorIndex = 4 '塗りつぶしを緑色
End With
For R2 = 2 To 4
For C2 = 10 To 12
If Cells(R1, C1) = Cells(R2, C2) Then Cells(R1, C1).Font.ColorIndex = 3
Next C2
Next R2
For R3 = 2 To 5
For C3 = 14 To 17
If Cells(R1, C1) = Cells(R3, C3) Then Cells(R1, C1).Font.ColorIndex = 5
Next C3
Next R3
Next C1
Next R1
|
|