XLOOKUP using column header when it's NOT a table?

adambc

Active Member
Joined
Jan 13, 2020
Messages
402
Office Version
  1. 365
Platform
  1. Windows
Is this possible?

I am working with an extract from a source system that presents data in a range that is NOT a table - and at this stage I do not want to convert the range into a table (in VBA or manually) before I do the XLOOKUP (long story!) ...

I am currently using XLOOKUP(lookup_value, A1:A999, B1:B999) but I need to extend this to multiple extracts where the lookup_array and return_array may not be in column A & B respectively but do have the same column header name (in row 1) ...

If the data WAS in a table, I know exactly how to do this, but it's NOT (in a table) eg =XLOOKUP(lookup_value,Table1[Header1],Table1[Header3])

But is there a way to do this using Header1 & Header2 when I don't have a table name to refer to?

Thanks ...
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
What version of Excel are you using, as neither 2016 nor 2019 has Xlookup?
 
Upvote 0
Ok, you may want to update your profile, if that is all you use..
How about
Excel Formula:
=XLOOKUP(A2,XLOOKUP("Header1",B1:Q1,B2:Q100),XLOOKUP("Header2",B1:Q1,B2:Q100))
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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