Extract records that are not in either dataset

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
165
Office Version
  1. 365
Platform
  1. Windows
I'm after a formula that extracts entries that are not on either dataset, the filter function gives me a VALUE error, I can only get FILTER to work it out if I have single columns of data. The correct formula would return Jack, Fred, and Milton
Book6
ABCDEF
1Group 1Group 2
2JackKenPeterVic#VALUE!
3TomSallyTomFred
4PeterVicJaneMilton
5JaneSally
Sheet1 (2)
Cell Formulas
RangeFormula
F2F2=FILTER($A$2:$B$5,NOT(COUNTIF($D$2:$E$5,$A$2:$B$5)))
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I have managed a solution in F6 which I'm partially happy with, but how do you remove the array component and the 0 in cell G9? Ideally I'd like the solution to be Fred and Milton in separate cells.

Book6
ABCDEFG
1Group 1Group 2
2JackKenPeterVic#VALUE!
3TomSallyTomFred
4PeterVicJaneMilton
5JaneSally
6 
7Fred
8Milton
90
Sheet3
Cell Formulas
RangeFormula
F2F2=FILTER($A$2:$B$5,NOT(COUNTIF($D$2:$E$5,$A$2:$B$5)))
F6:G9F6=IF(COUNTIF(A2:B5,D2:E5)=0,D2:E5,"")
Dynamic array formulas.
 
Upvote 0
How about
Excel Formula:
=UNIQUE(TOCOL(A2:E5),,1)
 
Upvote 0
Thanks Fluff, a most economical and effective solution.

If I may, I have 2 follow-up questions:
1. How would you change the solution if you wanted to list the entries that were common to both lists?
2. I've observed from time to time that with arrays you get solutions as per my post 2 where you have blanks or empty cells, I use TEXTJOIN to combine into one cell but is there a workaround/method to simply list the solution in separate cells?
 
Upvote 0
As both of those are different questions, they need new threads.
 
Upvote 0

Forum statistics

Threads
1,215,123
Messages
6,123,183
Members
449,090
Latest member
bes000

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