|
Jakaさんのコードをお借りして・・
Sub vivi()
Dim LastP As Long, i As Long, CInd As Long
Dim Sh As Worksheet, CSer As Series
Application.ScreenUpdating = False
Set Sh = ActiveSheet
Set CSer = Sh.ChartObjects("グラフ 1") _
.Chart.SeriesCollection(1)
LastP = CSer.Points.Count
For i = 1 To LastP
Select Case Sh.Cells(i, 1).Value
Case Is >= 30
CInd = 3
Case Is >= 20
CInd = 6
Case Else
CInd = 17
End Select
CSer.Points(i).Interior.ColorIndex = CInd
Next i
Application.ScreenUpdating = True
Set CSer = Nothing: Set Sh = Nothing
End Sub
|
|