XLOOKUP - Lookup Array Data in Multiple Columns

Ozzy23

New Member
Joined
Dec 21, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
Hi All,


Really struggling to get around the below problem. Any help would be appreciated.

I have 2 worksheets within my workbook and trying to create a XLOOKUP. See scenario below.


=XLOOKUP(WORKSHEET2(A2), WORKSHEET1(116 COLUMNS), WORKSHEET1(COLUMN A))


Worksheet 2 (A2)
= My LOOKUP value is in column A of worksheet 2

Worksheet 1 (116 COLUMN) = My LOOKUP ARRAY is on worksheet 1 and is 116 columns of data. This is where I am struggling as XLOOKUP gives an error as I am assuming it cannot search across columns?

Worksheet 1 (COLUMN A) = The RETURN ARRAY is column A of Worksheet 1 and the value will be populated into my cell in Worksheet 2


Any solutions on how to tackle this would be appreciated :) if any additional info is required let me know!
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Worksheet 1 (116 COLUMN) = My LOOKUP ARRAY is on worksheet 1 and is 116 columns of data. This is where I am struggling as XLOOKUP gives an error as I am assuming it cannot search across columns?
Lookup array has to be a particular column on worksheet 1

OR

Multiple conditions to search multiple columns

OR

Do you want to tell excel that it could be anywhere in 116 Columns on Worksheet 1?
 
Last edited:
Upvote 0
Do you want to tell excel that it could be anywhere in 116 Columns on Worksheet 1?

This as the value I'm searching for could be in any of the 116 columns

Attaching a screenshot of the basic scenario to help visualize.
 

Attachments

  • 1000043636.png
    1000043636.png
    89 KB · Views: 48
Upvote 0
Hi & welcome to MrExcel.
You mention 116 columns but cols B to GI is 190, so which should it be?
 
Upvote 0
Hi & welcome to MrExcel.
You mention 116 columns but cols B to GI is 190, so which should it be?
Thanks for the welcome. It's 116 columns, the screenshot is just a sample for reference of how I have the sheets setup etc. :)
 
Upvote 0
Could the lookup value appear more than once in those columns? If so, what outcome do you want?
 
Upvote 0
116 is B to DM, so how about
Excel Formula:
=XLOOKUP(A2,TOCOL(Sheet1!$B$2:$DM$100),TOCOL(IF(SEQUENCE(,116),Sheet1!$A$2:$A$100)))
This assumes the lookup values only occurs once in the data.
 
Upvote 0
Could the lookup value appear more than once in those columns? If so, what outcome do you want?
In some instances yes the same value it could appear more than once in a different column and row within those columns.

Ideally I want to get the return values from column A in worksheet 2 that correspond to the rows my lookup values appear in. There's 116 columns and 726 rows.

I hope I'm making it clear, thanks for helping.
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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