如何对包含结构化 table 引用的单元格执行 index/match 条件格式设置

How to do a index/match conditional formatting on a cell that contains structured table references

当匹配的文本为 "Monthly Regular"

时,我正在尝试使用 conditional formatting 将单元格着色为红色

示例代码如下:

=IF(index(Salary[Type],match($A2,Salary[Person],0))="Monthly Regular",TRUE,FALSE)

我得到的错误是:

要在条件格式公式中使用结构化 table 引用,请使用 INDIRECT 函数。所以你的条件格式公式变成:

=INDEX(INDIRECT("Salary[Type]"),MATCH($A2,INDIRECT("Salary[Person]"),0))="Monthly Regular"

另请注意,您不需要 IF...TRUE,FALSE 函数。