Excel条件格式 - 'IF'公式语法

时间:2021-09-24 20:23:45

I would like to use this formula as a conditional formatting formula:

我想使用此公式作为条件格式公式:

=IF(COUNTIFS(AccountsMonthsOrdered[Account],'Account Summary 2013'!$A$1,AccountsMonthsOrdered[Month],'Account Summary 2013'!F$12)>0,1,0)

It checks to see if the account name $A$1 and month F$12 appear together in the AccountsMonthsOrdered table, returning 1 if it does, and 0 if it does.

它检查帐户名$ A $ 1和月F $ 12是否一起出现在AccountsMonthsOrdered表中,如果是,则返回1,如果是,则返回0。

It works fine when it's in a cell on its own, but no matter how I try to rephrase it Excel won't accept it in the conditional formatting formula box.

单独在单元格中它可以正常工作,但无论我如何重写它,Excel都不会在条件格式化公式框中接受它。

1 个解决方案

#1


2  

The formula in conditional formatting does not accept Table columns... To remedy make a named range that points to the [Account] column from your table, reference the named range in your formula instead of to the table column. Same for [Month]

条件格式中的公式不接受表列...要修复从表中指定[Account]列的命名范围,请引用公式中的命名范围而不是表列。同月[月]

#1


2  

The formula in conditional formatting does not accept Table columns... To remedy make a named range that points to the [Account] column from your table, reference the named range in your formula instead of to the table column. Same for [Month]

条件格式中的公式不接受表列...要修复从表中指定[Account]列的命名范围,请引用公式中的命名范围而不是表列。同月[月]