Lookup a Match in an Array that can be in any column of the Array

rehanahmad

New Member
Joined
Jan 12, 2011
Messages
23
Office Version
  1. 2019
  2. 2016
Hi
I am working on an Excel model where I am struggling to find a formula where I want to look for an exact match in a table of array that can be found in any columns out of 42 columns of the array with about 4000 rows. The search criteria I want to lookup can have up to 2 matches. Can someone please help?
 
"COLUMNS($B:B))", is it referring to the Column B where the formula is written? i.e. if the formula is written in B2 in your example, it this part "COLUMNS($B:B))" referring to the same column?
Yes, the COLUMNS function should contain the column of the first cell with the formula before it is copied to the right. So if the first formula column was column D like below, then that first formula contains COLUMNS($D:D)

rehanahmad.xlsm
ABCDEF
1Lookup StringResult 1Result 2Result 3
2W4BC 
3A6   
4Y9ABD
5K9   
6J5D  
7O3D  
Sheet2
Cell Formulas
RangeFormula
D2:F7D2=IFERROR(INDEX(FILTERXML("<p><c>"&TEXTJOIN("</c><c>",1,INDEX(Sheet1!$A:$A,IF(Sheet1!$T$2:$AB$5=$A2,ROW(Sheet1!$A$2:$A$5),99))&"")&"</c></p>","//c"),COLUMNS($D:D)),"")
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,214,516
Messages
6,119,976
Members
448,934
Latest member
audette89

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