xlookup against multiple columns in lookup array

RookieExcel22

New Member
Joined
Aug 11, 2023
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have the below table of data

Column GCol HCol ICol J
ValueValueQuestion 1Question 2
ABAD32
AC45

I want to bring the data in column Question 1 into a table that looks like this

Col ACol B
ValueQuestion 1
AB3
AC4
AD3


I know I can use an ifna(vlookup but that is a lot of effort. I tried an xlookup hoping it could look against both value columns but that did not work. I ended up using this formula:

=IFNA(XLOOKUP(A2,$G$2:$G$3,XLOOKUP(B$1,$I$1:$J$1,$I$2:$J$3)),XLOOKUP(A2,$H$2:$H$3,XLOOKUP(B$1,$I$1:$J$1,$I$2:$J$3)))

While it did work, it is a bit of effort to set up as I have 15 value columns. Wondering if there is a simpler way! Thank you.
 
It works for me with more than 255 characters. Can you post the actual data.
Strange, I will continue to play with it. There were some special characters too, not sure if that causes issue. Unfortunately, I cannot share the data :(.
 
Upvote 0

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,216,045
Messages
6,128,477
Members
449,455
Latest member
jesski

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