[英]Conditional Formatting - highlight is coloring cells with no discrete match
So I am trying to compare from 2 lists of values in excel and highlight matches. 因此,我尝试从excel中的2个值列表中进行比较,并突出显示匹配项。 Upon using the duplicate highlight function in conditional format I am getting cells highlighted that either have no match at all in the 2 columns or possibly is seeing 02 matching with 2 shown in the screenshot.
在条件格式下使用重复突出显示功能时,我得到的是突出显示的单元格,它们要么在2列中根本不匹配,要么可能看到屏幕快照中显示2与02匹配。 Is there any way to get EXACT matches only?
有什么办法只能使完全匹配吗? Thanks!!
谢谢!!
The way I would approach this is to add a separate "Match" column that does the look-up for you, then add a formula-based conditional format to the first column. 我将采用的方法是添加一个单独的“匹配”列为您进行查找,然后将基于公式的条件格式添加到第一列。 Doing that I get this:
这样做我得到这个:
The match formula in cell F3 is: F3单元格中的匹配公式为:
=MATCH(D3,$A$1:$A$2,0)
The conditional formula in cell D3 is: 单元格D3中的条件公式为:
=NOT(ISNA(F3))
However, for larger spreadsheets, lots of cells with conditional formatting can really slow things down. 但是,对于较大的电子表格,许多具有条件格式的单元格确实会使速度变慢。 I used to use something like this on one of my templates but later switched to a VBA formatting script that would do the same thing but only when needed.
我曾经在一个模板上使用过类似的方法,但是后来切换到了VBA格式化脚本,该脚本可以执行相同的操作,但仅在需要时才执行。 It really depends on the size of the spreadsheet and how often the data is likely to change whether always-there conditional formatting or a run-when-needed VBA script would be better in your case.
实际上,这取决于电子表格的大小以及数据可能更改的频率,是否总是有条件的格式设置或需要时运行的VBA脚本在您的情况下会更好。
Hope that helps. 希望能有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.