【发布时间】:2016-12-22 20:14:33
【问题描述】:
【问题讨论】:
-
恐怕这在 Excel 中是不可能的。您将需要 VBA / 用户定义的函数。
标签: vba excel excel-formula excel-udf
【问题讨论】:
标签: vba excel excel-formula excel-udf
您将需要 VBA / 用户定义的函数。
关注this tutorial:
首先打开您需要根据背景颜色添加单元格的工作表。
接下来,按 ALT + F11 打开 VB 编辑器。导航到“插入”>“模块”。
之后,将“ColorIndex”UDF 粘贴到编辑器中。
Function ColorIndex(CellColor As Range)
ColorIndex = CellColor.Interior.ColorIndex
End Function
然后您可以在 Excel 工作表中使用 ColorIndex(cellReference)。
【讨论】:
也许你应该改变你的观点。例如,您可以将字母更改为“y”,而不是颜色“X”。 所以 COUNTIF 会起作用。
【讨论】: