到Excel VBA,按F1进入帮助。

查找xlRgbColor.进入条目选择颜色表格所有内容粘贴到Excel页面中。

清除当前页面的格式。

运行下面的宏:

Sub TestColor()
    Dim i As Integer
    For i = 1 To 142
    With Cells(i, 4).Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = Cells(i, 2).Value
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Next    
End Sub

然后,将会在第四列见到颜色的可视效果。注意宏中也说明了xlRgbColor是如何使用的。