« グラフに色づけ | Main | チェブラーシカ »

July 13, 2008

ガントチャート色塗り(超ハードコーディング)

EXCELで作るガントチャート色塗りマクロ(超ハードコーディング)


2行目に日付
3列目に開始日
4列目に終了日


Sub PaintGanttChart()
For r = 4 To 136
If ActiveSheet.Cells(r, 1) = True Then
For col = 7 To 60
ActiveSheet.Cells(r, col).Interior.ColorIndex = xlNone
If ActiveSheet.Cells(2, col).Value >= ActiveSheet.Cells(r, 3) _
And ActiveSheet.Cells(2, col).Value <= ActiveSheet.Cells(r, 4) Then
ActiveSheet.Cells(r, col).Interior.ColorIndex = 35
End If
Next
Else
For col = 7 To 60
ActiveSheet.Cells(r, col).Interior.ColorIndex = xlNone
Next
End If

Next
End Sub

|

« グラフに色づけ | Main | チェブラーシカ »

Comments

Post a comment



(Not displayed with comment.)




TrackBack

TrackBack URL for this entry:
http://app.cocolog-nifty.com/t/trackback/4666/41825577

Listed below are links to weblogs that reference ガントチャート色塗り(超ハードコーディング):

« グラフに色づけ | Main | チェブラーシカ »