我有一长串代码,成功地创建了一个大的数据集。
最后一项任务(CODE NOT WRITTEN)是用相同的颜色突出显示所有填充的列(A:BD),并且每次标识符(列B中)更改时,该颜色都会更改。每个ID可以有1-10行与其关联。
我需要的颜色是粉彩(所以你仍然可以阅读黑色文字)。
我很好地在代码中硬编码了一组RGB(可能是10种颜色),只是让高亮部分连续循环这些颜色。
我想用psuedo表达的意思是
c1 = RGB(R, G, B)
c2 = RGB(R, G, B)
c3 = RGB(R, G, B)
c4 = RGB(R, G, B)
c5 = RGB(R, G, B)
Sheet1.Range("A1:BD1").Interior.Color = c1
if b2=b1 Sheet1.Range("A2:BD2").Interior.Color = c1
else Sheet1.Range("A2:BD2").Interior.Color = c2
if b3=b2 Sheet1.Range("A2:BD2").Interior.Color = c2
else Sheet1.Range("A2:BD2").Interior.Color = c3
字符串
1条答案
按热度按时间nx7onnlm1#
试试这样的方法:
字符串