Conditional formatting: combining multiple checks

牧云@^-^@ 提交于 2019-12-11 10:43:20

问题


Right now I check if a cell is blank, if it is, it becomes red.

=ISBLANK($B$12)

However this cell only needs to be red when it's empty AND another condition is met: the cell above needs to be set to "YES" or blank.

I tried doing something like:

=ISBLANK($B$12),($B$11)=!"NO"

But that doesn't really work.


回答1:


The AND function can combine the logic in the manner you are looking for. Try the following,

=AND(ISBLANK($B$12), NOT($B$11="NO"))
'or,
=AND($B$12="", $B$11<>"NO")

You will likely want to remove the $ absolute anchor from either the row or column if you want to apply that condition to more than a single cell.

These formulas are applied with the 'Use a formula to determine which cells to format' option. They are put into the 'Format values where this formula is true:' text box.

 




回答2:


You could check for the cell being blank and above being "YES" with the following:

=AND(ISBLANK($B$12),EXACT($B$11, "YES"))


来源:https://stackoverflow.com/questions/34746364/conditional-formatting-combining-multiple-checks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!