根据该行中第二个单元格的值颜色整行? [英] Color entire row based on the value of 2nd cell in that row?
本文介绍了根据该行中第二个单元格的值颜色整行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
否。 |名称|其他数据|其他数据2 |日期|日期2 |
例如,如果Name = John Tery =>颜色行为红色,如果Name = Mary Jane =>颜色行为粉色
等。
我尝试使用条件格式化,但我不知道如何使这项工作。我在Excel中对这些任务的经验很少。
任何人都可以帮忙?
所有名称都是双字名称
解决方案
如果只有几个名字可以处理,每个条件格式公式将看起来像这个
= $ B2 =John Tery
- 您需要从顶行中选择受影响的行(因此当前活动单元格位于第2行,而不是最后一行)
- 对列
$ B
的绝对引用意味着对于不同列中的所有单元格,列B将进行测试 - 相对于行
2
的引用意味着对于不同行中的单元格,将对其自己的行进行测试(例如,对于单元格A42,公式将测试$ B42的值) - 相等运算符
=
将返回TRUE或FALSE(或者如果任何参数是错误,则返回错误),并且$IF
条件...
I have a list in Excel and I need to format rows based on the value in the cell 2 of that row. This is how data looks like
No. | Name | Other data | Other data 2 | Date | Date 2 |
For example, if Name=John Tery => color row as Red
, if Name=Mary Jane => color row as Pink
, etc.
I tried using conditional formatting, but I did not know how to make this work. I have very little experience with such tasks in Excel.
Can anyone help?
PS. all name are two-word names
解决方案
if there are only a few names to handle, each conditional-format formula would look like this
=$B2="John Tery"
- you need to have selected the affected rows from the top row down (so current active cell is in the 2nd row, not in the last row)
- absolute reference to column
$B
means that for all cells in different columns, column B will be tested - relative reference to row
2
means that for cell in different rows, its own row will be tested (e.g. for cell A42, the formula will test value of $B42) - equality operator
=
will return either TRUE or FALSE (or an error if any of the arguments are errors) and it has the same use as insideIF
conditions...
这篇关于根据该行中第二个单元格的值颜色整行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文