Xlookup multiple lookup values

warren7504

New Member
Joined
Mar 10, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am trying to add to the lookup value so that the formula either returns information for a "P" or a "W" but am having trouble adding in the W search. What would be the best way to perform this? Any help is greatly appreciated.
Here is my current formula:

=IFERROR(1/(1/XLOOKUP("P",L9:AEH9,L$7:AEH$7,"")),"")

The formula works as planned and I thought I'd be able to add to it but haven't been able to get it to work as intended yet with the W callout.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
Hi & welcome to MrExcel.

Could you have both a P & a W on that row? If so what should be returned?

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
Try
Excel Formula:
=IFERROR(IFERROR(1/(1/XLOOKUP("P",L9:AEH9,L$7:AEH$7,"")), 1/(1/XLOOKUP("W",L9:AEH9,L$7:AEH$7,""))), "")
 
Upvote 0
Solution
That worked. Thanks. I wasn't sure how to nest them together correctly.
 
Upvote 0

Forum statistics

Threads
1,215,162
Messages
6,123,382
Members
449,097
Latest member
Jabe

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