VBA Excel: Range of RGB for Colorindex compatibility
问题 I have a macro created in Excel 2007 which lets a value depend on the font color of a source file, as follows (this piece of code is part of a loop): If Worksheets("Source1").Cells(i, j).Font.Color = RGB(165, 165, 165) Or Worksheets("Source1").Cells(i, j).Font.Color = RGB(117, 146, 60) Then Worksheets("Result").Cells(UnusedRow, 15).Value = "Closed" Else Worksheets("Result").Cells(UnusedRow, 15).Value = "Active" End If This works without a problem. However, strangely enough the same cells in