You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Error finding with LOOKUP

Hi all,


I am trying to build in an error catching procedure into my LOOKUP formula.


The formula searches for a phrase and returns great when found.

But returns wrong numbers when not found, where it should return "Not found"


I have tried with IFERROR etc. but that might not be the way to go.



Kind regards...Jan


Posted on Mar 15, 2023 5:49 AM

Reply
3 replies

Mar 15, 2023 6:54 AM in response to jklarsen

Instead of the (outdated) LOOKUP function you might want to try the modern XLOOKUP.


XLOOKUP(search-value,search-range,return-range,if-not-found,match-type,search-type)


An explanation and examples of usage can be found by reviewing the entry for XLOOKUP at Help > Formulas and Functions Help in your menu.


Note there is a parameter where you can specify what you want to show if the value is not found.


SG

Mar 16, 2023 12:15 AM in response to jklarsen

Hi Jan,


LOOKUP, as SGIII has noted is an old and outdated function. That it is still supported in Numbers is likely to keep compatibility with older files that are opened in the newer versions of Numbers.


The 'wrong' answers you were getting are due to LOOKUP's lack of an "exact match" setting, and the default rule that the largest value less than or equal to the search value will be found and returned to the cell containing LOOKUP. Useful in its day, but less so now.


Regards,

Barry


PS:


The "Best Answer" button is intended to mark the post that supplied that answer, in this case, SG's, and to bring it to the position immediately after the question asked in the first post, where it is easier to find by others with a similar issue.


B.

Error finding with LOOKUP

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.