Compare two columns, return missing

jcooooper

Board Regular
Joined
Mar 24, 2018
Messages
74
Office Version
  1. 365
Platform
  1. Windows
Hi all,

In the below, I am trying to return the missing values in named_range_1, that appear in named_range_2.

Third column is the desired result.

I've spent a couple of hours with the UNIQUE, COUNTIF and FILTER options without much success : /

Any help appreciated!

Thanks!

named_range_1named_range_2Output
ArgentinaArgentinaAustria
AustraliaAustraliaBermuda
AustriaCyprus
BahamasBahamas
BahrainBahrain
BelgiumBelgium
Bermuda
BrazilBrazil
British Virgin IslandsBritish Virgin Islands
BulgariaBulgaria
CameroonCameroon
CanadaCanada
Cayman IslandsCayman Islands
ChileChile
ChinaChina
ColombiaColombia
Cyprus
Czech RepublicCzech Republic
DenmarkDenmark
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
How about
+Fluff 1.xlsm
ABC
1named_range_1named_range_2Output
2ArgentinaArgentinaAustria
3AustraliaAustraliaBermuda
4AustriaCyprus
5BahamasBahamas
6BahrainBahrain
7BelgiumBelgium
8Bermuda
9BrazilBrazil
10British Virgin IslandsBritish Virgin Islands
11BulgariaBulgaria
12CameroonCameroon
13CanadaCanada
14Cayman IslandsCayman Islands
15ChileChile
16ChinaChina
17ColombiaColombia
18Cyprus
19Czech RepublicCzech Republic
20DenmarkDenmark
Lists
Cell Formulas
RangeFormula
C2:C4C2=FILTER(named_range_2,ISNA(MATCH(named_range_2,named_range_1,0)))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
named_range_1=Lists!$A$2:$A$20C2
named_range_2=Lists!$B$2:$B$20C2
 
Upvote 0
Solution
Hi JCooooper,

I only have Excel 2016 so this would be my approach, which assumes no duplicates in named_range_2

JCooooper.xlsx
ABC
1named_range_1named_range_2Output
2ArgentinaArgentinaAustria
3AustraliaAustraliaBermuda
4AustriaCyprus
5BahamasBahamas 
6BahrainBahrain 
7BelgiumBelgium 
8Bermuda 
9BrazilBrazil 
10British Virgin IslandsBritish Virgin Islands 
11BulgariaBulgaria 
12CameroonCameroon 
13CanadaCanada 
14Cayman IslandsCayman Islands 
15ChileChile 
16ChinaChina 
17ColombiaColombia 
18Cyprus 
19Czech RepublicCzech Republic 
20DenmarkDenmark 
Sheet1
Cell Formulas
RangeFormula
C2:C20C2=IFERROR(INDEX(named_range_2,AGGREGATE(15,6,ROW(named_range_2)-ROW($B$1)/((ISNA(MATCH(named_range_2,named_range_1,0)))),ROW()-ROW($C$1))),"")
Named Ranges
NameRefers ToCells
named_range_1=Sheet1!$A$2:$A$20C2:C20
named_range_2=Sheet1!$B$2:$B$20C2:C20
 
Upvote 0
How about
+Fluff 1.xlsm
ABC
1named_range_1named_range_2Output
2ArgentinaArgentinaAustria
3AustraliaAustraliaBermuda
4AustriaCyprus
5BahamasBahamas
6BahrainBahrain
7BelgiumBelgium
8Bermuda
9BrazilBrazil
10British Virgin IslandsBritish Virgin Islands
11BulgariaBulgaria
12CameroonCameroon
13CanadaCanada
14Cayman IslandsCayman Islands
15ChileChile
16ChinaChina
17ColombiaColombia
18Cyprus
19Czech RepublicCzech Republic
20DenmarkDenmark
Lists
Cell Formulas
RangeFormula
C2:C4C2=FILTER(named_range_2,ISNA(MATCH(named_range_2,named_range_1,0)))
Dynamic array formulas.
Named Ranges
NameRefers ToCells
named_range_1=Lists!$A$2:$A$20C2
named_range_2=Lists!$B$2:$B$20C2
Thank you, works wonderfully!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,964
Messages
6,175,658
Members
452,664
Latest member
alpserbetli

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