• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Need Help with XLOOKUP


Hi Friends, this is the first time I am using XLOOKUP, it is returning the value but the place where it should give an error it is returning Points. I tried searching a lot but was unable to find anything specific to this issue.

Seems the "error" is in the approximate match criterion of formula. With this setup, your lookup table is sorted on the key value, I believe a binary search is preferred as it speeds up calculation.
It's generally a bad practice to reference entire columns, and you can use a spilling array formula in cell [C2]


  • Sample(5).xlsx
    37.1 KB · Views: 1
Who says the formula should return an error? The text "Days Bucket" is part of the column you are searching and, being text, it is treated by Excel as being larger than any number. Hence it returns "Points" perfectly correctly.

Just to back up @GraH - Guido 's comment, I timed the 1457 calculations you performed at just under 30 sec. By comparison, the array formula
= XLOOKUP(days, daysBucket, points, "Out of range", 1)
took 4ms to obtain the same results.