简体   繁体   中英

How do I highlight duplicates based on values in 2 columns?

I have an excel file with 25,000 rows. These rows contain user entered customer data and a lot of it is misspelled. It is currently fixed in a pivot table. I'm wanting to know what formula would be needed for me to do what the image below is representing. We are attempting to identify all duplicates in the system.

I would like the logic to be as follows:

IF first x number of characters in address are duplicate (address column is sorted AZ in real life)

AND

First letter of last name is EQUAL in both duplicates

THEN highlight both rows

Thank you in advance. Let me know if you need any clarification.

NOTE: the image below is just an example

表格示例

There might be another efficient method. Here is one way to resolve this. I use conditional formatting twice. 在此处输入图像描述

Please pay attention to the difference in "Applies to" parts. 在此处输入图像描述

The first formula is =AND(LEFT($A2,6)=LEFT($A1,6),LEFT($B2,1)=LEFT($B1,1))

The second formula is =AND(LEFT($A1,6)=LEFT($A2,6),LEFT($B1,1)=LEFT($B2,1))

I set if two addresses share the first 6 (SIX) letters, then the first condition is satisfied.

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