Formula to find Mis-Matches in two arrays of varying size

CodeNinja

Well-known Member
Joined
Feb 18, 2013
Messages
644
Good afternoon,
I am trying to figure out a formula that returns true/false on two array saying if they match. A simple example of what I want is as follows:

Array1: {"A", "C", "D"}
Array2: {"A", "B", "C", "D", "E"}

Desired result: {True, False, True, True, False}

Using ={"A", "C", "D"}={"A", "B", "C", "D", "E"} will result in {TRUE,FALSE,FALSE,#N/A,#N/A}

How do I get an unknown set of strings to line up properly.... Obviously my arrays are more complicated than A, B, C...

Thanks,

CodeNinja
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
The question is which array are you comparing to the other?
I mean, are you checking to see if the values in Array1 are in Array2, or vice versa?

If you are trying to do both ways, your desired result doesn't really make any sense, as what if your two arrays were:
Array1: {"A", "C", "D"}
Array2: {"X", "Y", "Z"}
Then what would your results look like? Would they have three items or six?

I think what you want to do is loop through the items of one array, and see if it is found in the other.
See here for a VBA function someone may to do that:
https://wellsr.com/vba/2016/excel/check-if-value-is-in-array-vba/
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
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