Create separate data list from column excluding data from another column

288enzo

Well-known Member
Joined
Feb 8, 2009
Messages
727
Office Version
  1. 2016
Platform
  1. Windows
First, thank you to all those that have been helping me out with my project. I believe this is my last question, and it's difficult to explain.

I have a list of emails in a column on sheet data, I have another list of emails in a column on sheet1. I'd like to create a fresh list of emails from data excluding any that match the list in sheet3. I sure hope someone understands that :-)

The master list of email addresses
Book1.xlsx
A
1
2
3
4email1
5email2
6email3
7email4
8email5
9email6
10email7
11email8
12email9
13email10
Sheet2


Those emails to exclude
Book1.xlsx
A
1Email
2email2
3email4
4email6
5 
6 
7 
8 
9 
10 
11 
Sheet1
Cell Formulas
RangeFormula
A2:A11A2=IFERROR(INDEX(Sheet2!$A$4:$A$9999,AGGREGATE(15,6,ROW(Sheet2!$A$4:$A$9999)-ROW(Sheet2!$A$3)/(Sheet2!$B$4:$B$9999="Yes"),ROW()-ROW($A$1))),"")


This is what the result should look like, although I had to do it manually.
Book1.xlsx
A
1Email List
2email1
3email3
4email5
5email7
6email8
7email9
8email10
Sheet3


Thank you!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
You can use the same formula as you've got on Sheet1, just change the ="Yes" to <>"Yes"
 
Upvote 0
Solution
With Power Query, bring each table into the PQ editor. Merge the two tables via a left anti join.

Power Query:
let
    Source = Table.NestedJoin(Table1, {"Column1"}, Table2, {"Email"}, "Table2", JoinKind.LeftAnti),
    #"Expanded Table2" = Table.ExpandTableColumn(Source, "Table2", {"Email"}, {"Table2.Email"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Table2",{"Table2.Email"})
in
    #"Removed Columns"

Book8
ABCDE
4Column1EmailColumn1
5email1email2email1
6email2email4email3
7email3email6email5
8email4email7
9email5email8
10email6email9
11email7email10
12email8
13email9
14email10
Sheet1
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top