简体   繁体   中英

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. 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. 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:

=MATCH(D3,$A$1:$A$2,0)

The conditional formula in cell D3 is:

=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. 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.

Hope that helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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