[英]Highlighting cells in column A if column B contains the correct value in Excel
I am trying to get a cell in column A to be highlighted if the corresponding cell in column B contains a certain value. 如果B列中的相应单元格包含某个值,我试图让A列中的单元格突出显示。 It's easy enough conditional formatting column B on its own but I would like to carry the colour across to column A no matter what value is in the A column.
条件格式化B列本身很容易,但我想将颜色传递到A列,无论A列中有什么值。
Say "Joe" is working sat, sun, mon and not working tue, wed, thu, fri, his name is in column B across from the the days he is working labeled in column A. I would like to highlight the days as well as his name whenever he is "working". 说“乔”正在工作,太阳,星期一和不工作星期二,星期五,星期四,星期五,他的名字在B栏中标记为A栏的对面的B栏。我想强调这些日子每当他“工作”时都是他的名字。
I hope this makes sense. 我希望这是有道理的。 I look forward to hearing if anybody has created or used a formula in this way before.
如果有人以前以这种方式创造或使用过配方,我期待着听到。
You can set conditional formatting in A2
based on a formula, so set the formula to something like the following: 您可以根据公式在
A2
设置条件格式,因此将公式设置为如下所示:
=B2="Joe"
To copy over the conditional formatting to the other cells, I selected the range and used Ctrl+Y
to redo the conditional formatting. 要将条件格式复制到其他单元格,我选择了范围并使用
Ctrl+Y
重做条件格式。 It changed the formula to match the current cell. 它更改了公式以匹配当前单元格。
Note: I did this in Excel XP, as I don't have Excel 2010 in front of me. 注意:我在Excel XP中这样做,因为我没有在我面前使用Excel 2010。
To format both columns (as requested), select ColumnA:B, clear existing CF rules from them and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true: : 要格式化两列(按要求),请选择ColumnA:B,从中清除现有CF规则和HOME>样式 - 条件格式,新规则..., 使用公式确定要格式化的单元格和格式化此公式所在的值是的 :
=$B1="Joe"
Format... , select choice of formatting, OK , OK . 格式化... ,选择格式选择, 确定 , 确定 。
For me also Ctrl + Y does not here work for copying down, let alone the copy across aspect. 对我来说, Ctrl + Y也不适用于复制,更不用说复制方面了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.