excel VBA 自动绘制甘特图


EXCEL 自动数值匹配颜色自动填充

Dim i, j As Integer
Dim str As String
Range("H8:BI89") = Sheet1.Cells(2, "F")
Range("H8:BI89").Interior.ColorIndex = 0
For i = 8 To 89
str = Sheet1.Cells(i, "F")
If (Not IsEmpty(str)) Then
For j = 9 To 61
If Cells(3, j) = str Then
Cells(i, j).Value = str
Cells(i, j).Interior.Color = Sheet1.Cells(i, "D").Interior.Color
End If
Next
End If
Next


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM