After comparing 2 ranges, return values that are missing based on criteria

flashgordie

Board Regular
Joined
Jan 9, 2008
Messages
95
Office Version
  1. 365
Platform
  1. Windows
Any help would be appreciated. Looking for a formula(s) to start at A20:B?? based on the "#" , that will list the items that appear in D6:E28, that do not appear in A3:B9 AND that have a category = "Colors"

test.xlsx
ABCDEF
1Workbook 1 listWorkbook 2 list
2#Desc#DescCategory
31212Red1011WhiteColors
41314Violet2801DonkeyAnimals
51415orange1212RedColors
61516Yellow5551BikeVehicles
71617Green2809ZebraAnimals
81718Blue1516YellowColors
91819Purple5552TrainVehicles
105557TractorVehicles
112802ElephantAnimals
121718BlueColors
135556BusVehicles
141617GreenColors
151819PurpleColors
162803PigAnimals
172805CowAnimals
182804SheepAnimals
195553TruckVehicles
201011White2806DogAnimals
211014Black1014BlackColors
225554MotorcycleVehicles
232808HorseAnimals
242807CatAnimals
255555CarVehicles
262810GoatAnimals
271415orangeColors
281314VioletColors
Sheet1
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
How about
Excel Formula:
=FILTER(D3:E28,(F3:F28="colors")*(ISNA(MATCH(D3:D28,A3:A9,0))))
 
Upvote 0
How about
Excel Formula:
=FILTER(D3:E28,(F3:F28="colors")*(ISNA(MATCH(D3:D28,A3:A9,0))))
ohhhh. that looks promising!!!! Very promising. Thanks. I will see if I can build from that! I have know idea what its doing, but that's part of the fun Thanks again.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
I might Add to this solution, that once the formula is entered, 2 further things may need to happen. 1) you may need to select a range of cell below, to allow the formula to "spill" and find all those in the critera, and two, as this is an array, you also need to press ctrl+shft+enter to active the formula.

Fluff would you agree?
 
Upvote 0
as this is an array, you also need to press ctrl+shft+enter to active the formula.
Definitely not. You do not need to use Ctrl Shift Enter with xl365 & you should never do it on a formula that spills.
 
Upvote 0
An alternative is to use Power Query. Bring both tables into the PQ editor. Filter the second table for Colors. Join the two tables with an Anti Join. This will be very effective if you have a very large data set. Here is the Mcode for the anti join

Power Query:
let
    Source = Table.NestedJoin(Table2, {"#"}, Table1, {"#"}, "Table1", JoinKind.LeftAnti),
    #"Removed Columns" = Table.RemoveColumns(Source,{"Category", "Table1"})
in
    #"Removed Columns"
 
Upvote 0

Forum statistics

Threads
1,215,091
Messages
6,123,062
Members
449,090
Latest member
fragment

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