如何基于单元格范围将条件格式应用于多个单元格 [英] How to apply conditional formatting for multiple cells based on a range of cells
问题描述
我在A列中有一个名称列表
我在B列中有一个由公式确定的名称列表。
I have a list of names in column A I have a list of names in column B determined by formula.
我是在A列中变为绿色的特定名称,如果它出现在B列中的任何位置。
I was the specific name to turn green in column A if it is present anywhere in column B.
例如
A-10个名字,只有3个是驾驶员。
B-输入驾驶员姓名和其他名称,以示对人的注视。当我在B列中输入名称时,我希望A列中的名称变为绿色,以便我知道它们已经进行了排序。
e.g. A - 10 names, only 3 are "drivers" B - I type driver names and other names as I 'fill the cars' with people. I want the name in column A to turn green when I type it in column B so I know they've been sorted.
在Google文档中工作
Working in google docs
推荐答案
单击单元格 A1
。然后从菜单中选择条件格式-> 新规则。
Click on cell A1
. Then choose Conditional Formatting -> New Rule from the menu.
选择选项使用确定要格式化哪些单元格的公式。
Choose the option "Use a formula to determine which cells to format".
在框中键入以下公式:
= (SUMPRODUCT((A1=B:B)+0))>0
单击格式... 按钮将颜色设置为绿色。
Click the "Format..." button to set the color to green.
单击确定。
在适用于 ,在要应用条件格式的列 A
中输入单元格范围。
Under "Applies to", type in your range of cells in column A
where you want the conditional formatting to apply.
请参见下面的示例,该示例显示了应用于单元 A1
到 A4
的这种条件格式。请注意, A
列中出现在 B
列中任何位置的任何名称都是绿色。
See below example that shows this conditional formatting applied to cells A1
to A4
. Notice how any name in column A
that appears anywhere in column B
is green.
这篇关于如何基于单元格范围将条件格式应用于多个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!