简体   繁体   中英

Compare two excel worksheets and find unique entries for both based only on email address columns

I have two excel worksheets with contact info for our affiliates. We offer two different products, rings and pendants, and have a separate sheet for each product that contains the affiliate contact info for companies ordering that product.

My employer's current issue is overlap. Some of our affiliates sell and market both pendants, and rings, and so they are on both lists.

I've been asked to filter the lists and give them a list of contacts who are unique to each list, as in a list of contacts who just appear on the rings affiliate list, and a list of contacts who just appear on the pendant affiliate list. They also asked for a list of contacts that appear on both lists.

Because of being hand typed, not all of the contact info has been entered in a standardized way, for instance some contacts have a middle initial in one list, and not in the other, or North is abbreviated in one but not the other etc. So I'll need to compare the lists based on the email address column.

Any help would be greatly appreciated.

I'm their web developer, and don't do advanced excel work. My last resort is exporting the tables as csv lists, importing them into a MYSQL database, and writing a quick script to separate and export the lists that I need.

You have a solution but not posted it as an answer so I am suggesting an alternative.

@BrOSs has suggested a pivot table for each sheet and I'd develop that into of the sheets combined . First though ensure the source is apparent (eg add a column with P in one and R in the other). In the example P and R are Column Labels but if moved to the Report Filter area then F can be filtered to show either P or R or both:

SO13955255示例

Adding more fields into the Row Labels area can be a good way to identify mismatches as part of a data quality review.

This can be done through conditional formatting.

Copy and paste emails from each list into a new sheet. Lets say column A represents list 1 and column C represents list 2. Now highlight data in column A,

Home> Conditional Formating > New Rule > Use a Formula to determine which cells to Format.

One formula box write the following: =ISNA(MATCH(A2,$C$2:$C$20,0)) Assuming that your data in column C is limited to 20 rows. Do the same for Column C as =ISNA(MATCH(C2,$A$2:$A$15,0)) Assuming that your data in column A is limited to 15 rows.

Now click the format button, select the color you'd like your unique cells to be highlighted as and click OK.

You have unique cells highlighted on both of your columns.

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