Dec 08 2019 10:29 AM
Hi Folks,
The following formula works:
=XLOOKUP("*1*",A:A,A:A,,2,1)
but this one doesn't:
=XLOOKUP("*1*",A:A,A:A,,2,2)
The same data is being used for both and is sorted ascending on A:A.
The second formula returns #VALUE.
Any ideas?
TIA,
Shane
Dec 08 2019 08:52 PM
Dec 09 2019 04:19 AM
Hello Shane
Another thought is "Do not use search modes 2 or -2"; the dynamic array solutions will take care of any sorting required in order to optimise the search without the user being involved.
A further thought is "do you believe the old strategy of creating references of the form A:A is compatible with modern dynamic array philosophy (except, of course, the circumstance in which the array has precisely 1048576 terms)? I see it as a legacy approach to creating dynamic behaviour in solution that relies upon the 'used range' to function; we now have better!
Dec 09 2019 05:37 AM
Hi,
Problem solved - author's mental disconnect.
Dec 09 2019 05:39 AM
Came to that conclusion after a little thought, thanks!
Dec 09 2019 05:42 AM
Thanks,
Wild card makes no sense for a binary search - I just wasn't using my gray matter, what there is left of it.