简体   繁体   English

基于相邻单元格的条件格式化单元格

[英]Conditional formatting cells based on adjacent cell

I am trying to show that a cell must be filled in. I want to use conditional formatting to highlight the cell isn't filled out using conditional formatting.我试图表明必须填写一个单元格。我想使用条件格式来突出显示未使用条件格式填写的单元格。 Based on an EMPTY spreadsheet (gets filled in weekly by row, so I don't want a bunch of red cells until a line is filled in).基于 EMPTY 电子表格(每周按行填写,因此在填写一行之前我不想要一堆红色单元格)。 I want a cell in column I to turn red when either columns "B:H" have text.当任一列“B:H”有文本时,我希望列 I 中的单元格变为红色。 Then if the person fills out a cell in column I the coloring goes away.然后,如果该人在 I 列中填写了一个单元格,则着色消失。 I have tried =AND(ISTEXT(B#),ISNONTEXT(I#)), but this means that when a different row in column B is filled out the conditional formatting doesn't work.我试过 =AND(ISTEXT(B#),ISNONTEXT(I#)),但这意味着当填写 B 列中的不同行时,条件格式不起作用。 I then tried to individually put the condition formatting in, but it only works on the first 2 rows.然后我尝试单独放入条件格式,但它只适用于前 2 行。 I also tried =AND(ISTEXT($B#),ISNONTEXT($I#)) to show that it is based on the column, that also didn't work.我还尝试了 =AND(ISTEXT($B#),ISNONTEXT($I#)) 以表明它是基于列的,但这也不起作用。 Any help would be greatly appreciated.任何帮助将不胜感激。

Assuming B:H are empty.假设 B:H 为空。 You can use an AND formula looking at COUNTA (of B:H) combined with ISBLANK (column I).您可以使用 AND 公式查看 COUNTA(B:H)和 ISBLANK(第 I 列)。

Select range I2:I4 and input this formula into your Conditional Format Rule: Select 范围 I2:I4 并将此公式输入到您的条件格式规则中:

=AND(COUNTA(B2:H2)>=1,ISBLANK(I2))

Then change your conditional format fill as RED.然后将您的条件格式填充更改为 RED。

Output: Output:

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM