How to Return Text instead of N/A when value is not found XLOOKUP

JulieBunavicz

New Member
Joined
Oct 9, 2023
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hi,

Any idea how to return "Not Found" instead of N/A when value is not found XLOOKUP?

Kind regards,

Julie Bunavicz
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
One way would be to wrap yopur current XLOOKUP formula in an IFERROR function, i.e.
Excel Formula:
=IFERROR(XLOOKUP(...),"Not Found")
 
Upvote 0
Awesome!! IFERROR worked :) I had been trying ISNA and also IF "N/A" then.... neither were exactly what I was looking for. I appreciate your responses. Thanks!!

Formula in the Test Lookup column =IFERROR(XLOOKUP(D2,A:A,B:B),"Not Found")




Test NumAnimalTest NumTest Lookup
1​
cat
1​
cat
2​
dog
2​
dog
3​
bird
3​
bird
4​
cat
4​
cat
5​
bird
5​
bird
6​
Not Found

I ❤️XLOOKUP
 
Upvote 0
As kweaver indicates, it is totally unnecessary to use IFERROR, as XLOOKUP already has a "Not Found" argument built right into it.
So I think their formula should work for you.
 
Upvote 0

Forum statistics

Threads
1,215,073
Messages
6,122,977
Members
449,095
Latest member
Mr Hughes

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