Excel条件格式,如果列A包含任何值高亮显示列B中的相邻单元格 [英] Excel Conditional Formatting If Column A Contains ANY Value Highlight Adjacent Cell In Column B

查看:78
本文介绍了Excel条件格式,如果列A包含任何值高亮显示列B中的相邻单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎应该很容易,但是,我一直无法自行解决这一问题.

我的问题是这样

如果列A中有一个值,我想以绿色突出显示列B中的相邻单元格.这向用户指示B列不需要任何值.此外,如果A列留为空白并且用户在B列中提供了一个值,我希望A列中的相邻单元格以相同的方式突出显示.

在下面的示例中,单元格B2和A3应该为绿色.

提前谢谢!

解决方案

要独立对待列,有两个简单的规则(只有 A B 值是当填充行中的任一单元格时使用相同的颜色).因此,请选择ColumnB,然后选择HOME>样式-条件格式,新规则...,使用公式来确定要格式化的单元格在该公式为真的情况下设置值的格式::

  = A1<>" 

格式... ,选择绿色,确定确定.

然后选择ColumnA并按照以下规则重复上述操作:

  = B1<>" 

This seems like it should be easy, however, I have been unable to figure this one out on my own.

My problem is this:

If there is a value in Column A, I would like to highlight the adjacent cell in Column B green. This indicates to the user that no value is necessary for Column B. In addition, if Column A is left blank and the user provides a value in Column B, I would like the adjacent cell in Column A highlighted in the same fashion.

In the sample below, cells B2 and A3 should be green.

Thank you in advance!

解决方案

To treat the columns independently two rules are simpler (only one is both A and B values are to be the same colour when either cell in the row is populated). So please select ColumnB and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::

=A1<>""

Format..., select green, OK, OK.

Then select ColumnA and repeat as above with this rule:

=B1<>""

这篇关于Excel条件格式,如果列A包含任何值高亮显示列B中的相邻单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆