Compare two arrays to return "Yes/No" result

hartsie

Board Regular
Joined
May 6, 2020
Messages
84
Office Version
  1. 2016
I have two arrays that I want to compare. The first array is user-defined and the second array is dynamic. Each array contains a list of numbers. If the second array has cells with values that match the first array, I want to return a "Yes."

For example, Array one has the numbers 1, 3, 9999, each found within one cell in an array of 10 cells. Array two, also made up of ten cells, on a different worksheet, might have one of those three values, or none of them. If Array two does contain one of the numbers found in Array one, I want to return a "Yes."

I feel like I am so close to having an answer.... but I have been spinning and I can't quite get there...

I hope someone knows a good solution.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Mr Excel Playground 3.xlsm
ABCDE
1Array 1Array 2Array 3
211003
33102200
4999104202
54106204
65108206
76110999
87112210
98114212
109116214
1110118216
12
13Yes
Sheet2
Cell Formulas
RangeFormula
A13A13=IF(SUM(IFERROR(MATCH(Array3,Array1,0),0))>0,"Yes","No")
Named Ranges
NameRefers ToCells
Array1=Sheet2!$A$2:$A$11A13
Array3=Sheet2!$E$2:$E$11A13
 
Upvote 1
Solution
@JamesCanale That is a brilliant solution. I have no idea how you thought of that... I am familiar with each of the functions... however, the nesting is still over my head. That was a great solution. Thank you
 
Upvote 0
Array formulas are gold. I never thought much of them a year ago. Hang around on mrexcel for a while and your skill will double.
 
Upvote 0
Mr Excel Playground 3.xlsm
ABCDE
1Array 1Array 2Array 3
211003
33102200
4999104202
54106204
65108206
76110999
87112210
98114212
109116214
1110118216
12
13Yes
Sheet2
Cell Formulas
RangeFormula
A13A13=IF(SUM(IFERROR(MATCH(Array3,Array1,0),0))>0,"Yes","No")
Named Ranges
NameRefers ToCells
Array1=Sheet2!$A$2:$A$11A13
Array3=Sheet2!$E$2:$E$11A13
Hello James, I have a similar issue that I hope you can help resolve. In my case I need to verify if a person is qualified based on a group of questions. This is where I have some conditional formatting indicating if they failed with a yellow highlight. So, in short, if anyone has no highlight then he/she should pass. Can you advise a formula to achieve this please ?

Thank you !
 

Attachments

  • Screenshot 2023-01-12 085521.png
    Screenshot 2023-01-12 085521.png
    22.3 KB · Views: 8
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,094
Latest member
bsb1122

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