Find a vector inside a matrix

hcova

New Member
Joined
Jul 29, 2010
Messages
19
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
Hi there.
Is there any way to find if a vector of numbers is contained in a matrix. (I would like to use an excel formula for this purpose) .
Let me explain it better with the below table.
In this example I would like to know if the vector {11, 14, 22, 24, 37, 39, 31} stored in cells D1:J1 is contained in the matrix D5:J35.
As you can see, the matrix contains the vector in line 28

1677984268767.png


In tried the formula =IF(ISNUMBER(MATCH(D1:J1, D5:J35, 0)), "Found", "Not Found") but it doesn't work.
Any help is welcome
Hernan
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
What about

Excel Formula:
=IF(ISNUMBER(MATCH(TEXTJOIN("|",,D1:J1),D5:D37&"|"&E5:E37&"|"&F5:F37&"|"&G5:G37&"|"&H5:H37&"|"&I5:I37&"|"&J5:J37,0)),"Found","Not Found")
 
Upvote 0
Untested alternatives,
Try this,
Excel Formula:
=IFERROR(IF(SUM(IFERROR(MATCH(D1:J1,D5:J35,0),0))=7,"Yes","No"),"No")

Or this,
Excel Formula:
=IF(COUNTIF($D$5:$J$35,D1)+COUNTIF($D$5:$J$35,E1)+COUNTIF($D$5:$J$35,F1)+COUNTIF($D$5:$J$35,G1)+COUNTIF($D$5:$J$35,H1)+COUNTIF($D$5:$J$35,I1)+COUNTIF($D$5:$J$35,J1)=7,"Yes","No")
 
Upvote 0
What about

Excel Formula:
=IF(ISNUMBER(MATCH(TEXTJOIN("|",,D1:J1),D5:D37&"|"&E5:E37&"|"&F5:F37&"|"&G5:G37&"|"&H5:H37&"|"&I5:I37&"|"&J5:J37,0)),"Found","Not Found")
Thanks a lot
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,215,338
Messages
6,124,360
Members
449,155
Latest member
ravioli44

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