Sub
gantt_chart()
Dim
lastrow, lastcol
As
Long
lastrow = Range(
"a65536"
).
End
(xlUp).Row
lastcol = Range(
"A:A"
).
End
(xlToRight).Column
Dim
i, j
As
Integer
For
j = 11
To
lastcol
For
i = 18
To
lastrow
If
Cells(15, j).Value >= Cells(i, 5).Value
And
Cells(15, j).Value <= Cells(i, 6).Value
Then
Cells(i, j).Value = 1
Cells(i, j).Interior.Color = vbRed
Cells(i, j).NumberFormat =
";;;"
Else
Cells(i, j).Value = 0
Cells(i, j).NumberFormat =
";;;"
End
If
Next
Next
End
Sub