XLOOKUP of one Value Within 2 Columns

meppwc

Well-known Member
Joined
May 16, 2003
Messages
604
Office Version
  1. 365
Platform
  1. Windows
I cannot figure out how to make XLOOKUP search on a particular value on one worksheet against 2 columns on a different worksheet
EXAMPLE
Worksheet = "Equipment"
Formula will be in cell B2
Look for the value in cell G2 using columns A & B of worksheet "LOOKUP"
If found in either column, return "EXISTS", if not found, return nothing.
 

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
How about
Excel Formula:
=IF(OR(ISNUMBER(XMATCH(G2,lookup!A2:A1000,0)),ISNUMBER(XMATCH(G2,lookup!B2:B100,0))),"Exists","")
 
Upvote 0
Do you want XLOOKUP to return an array or do you just want to know if the value in G2 exists in either A or B on the Lookup sheet?
 
Upvote 0
Fluff.............the formula returned blank when it should have returned "Exists"
 
Upvote 0
If it's returning "" then the value in G2 was not found on the Lookup sheet.
Can you post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
Fluff, disregard last comment. I had to expand the lookup from 1000 to 10,000 and it works correctly. Thanks so much
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,589
Messages
6,120,415
Members
448,960
Latest member
AKSMITH

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