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