I need an XLOOKUP formula with a variable Return Array

GeorgieAnne

New Member
Joined
Feb 20, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
Hello All,
Here is what I have to solve:
I get some data from another systems. This data changes every day every run. At times I will have a set of column headers something like @07, or @04, or @99. These could be in any column!

I need to construct an XLOOKUP with this kind of logic:
=XLOOKUP(lookup value, Lookup array, return array(find where the code @04 is for example, “not found, FALSE)

And at times code @04 may not be there, or it might be in column F, another day another run it maybe in column J

Thanks for any help
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
How about using index/match instead
Excel Formula:
=INDEX(Sheet1!B2:Z100,MATCH(A2,Sheet1!A2:A100,0),MATCH("@04",Sheet1!B1:Z1,0))
 
Upvote 0
How about using index/match instead
Excel Formula:
=INDEX(Sheet1!B2:Z100,MATCH(A2,Sheet1!A2:A100,0),MATCH("@04",Sheet1!B1:Z1,0))
Thanks Fluff, I ended up using INDEX/MATCH combination even though I really wanted to use the new XLOOKUP. I guess INDEX/MATCH is still the Queen of looking up data. Thanks for yours example I tailored it to my needs and simplified my version.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,930
Members
449,094
Latest member
teemeren

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