简体   繁体   English

使用Excel条件格式-想要突出显示与另一个单元格区域中的任何单元格匹配的区域中的单元格

[英]With Excel Conditional Formatting - Want to Highlight Cells in a range that match any from another range of cells

Sheet One has 5 cells in a row with numbers. 一张纸有5个连续的单元格,带有数字。 (A2:F2) (A2:F2)

Sheet Two also has 5 cells in a row with numbers. 第二张纸还连续5个单元格带有数字。 (A3:F3) (A3:F3)

I'd like to highlight sheet one's cells yellow every time that sheet two has a matching number entered. 每当第二张工作表输入匹配的数字时,我都会用黄色突出显示一张工作表的单元格。 (There will be more rows of data added to each sheet, but I am using the first row only, to keep it simple. (将有更多行数据添加到每张工作表中,但是为了简化起见,我仅使用第一行。

It works with creating a CF equals to, but I need something that applies to a range of data, from a range of data to make this less tedious. 它可以与创建等于CF一起使用,但是我需要一些适用于一系列数据的内容,以减少繁琐的工作。 Thank you for any tips! 谢谢您的提示!

I am using conditional formatting. 我正在使用条件格式。 I have tried Vlookup, Match, and Countif, but I am new to this type of formatting. 我已经尝试过Vlookup,Match和Countif,但对于这种格式我还是陌生的。

(Sheet two's numbers can be placed in a list (column), instead of a row, if that matters) (如果需要的话,可以将第二页的号码放在列表(列)中,而不是一行中)

I'd suggest using COUNTIF : 我建议使用COUNTIF

=COUNTIF(Sheet2!$A:$F,A2)>0

Snapshot of Sheet1 and the Conditional Formatting: Sheet1快照和条件格式:

在此处输入图片说明

Snapshot of Sheet2: Sheet2的快照:

在此处输入图片说明

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

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