Excel:使用IF语句判断一行中多列是否高亮

Excel: Using IF statement to determine if multiple columns in a row are highlighted

我想知道如何使用 IF 语句(或其他函数)来确定特定行中下图所示的所有列是否都突出显示:

Screenshot of Table

我希望将函数放在 T 列中,return "Buy" 如果该行中的所有列都突出显示。

提前致谢

现在我已经测试过了,但不确定你用的是什么绿色。不对的地方改一下

将此粘贴到 vba 模块中:

Function color(c As Range)
       If c.Interior.color = 5296274 Then color = True
End Function

然后像这样使用它:

=color(A1)

如果 A1 为绿色,它将 return 为真。
在您的情况下,您需要构建一个并喜欢:

=and(color(A1), color(B1)) 

等等...

并且您需要将工作簿保存为macroactivated workbook xlsm。

编辑添加的图片和其他颜色代码。这是"standard colors".

左边的绿色