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

adambc

Active Member
Joined
Jan 13, 2020
Messages
412
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

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
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,224,812
Messages
6,181,083
Members
453,021
Latest member
Justyna P

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