Forum Discussion
mtarler
Sep 06, 2023Silver Contributor
XMATCH Paradox
So I was 'playing' with some formula ideas and tried this one and got some paradoxical results. Can anyone explain what is happening? =XMATCH(1:1,1:1,,-1) So in this screenshot row 1...
HansVogelaar
Sep 06, 2023MVP
Microsoft will probably say that XMATCH wasn't designed for such a situation, but it looks like the algorithm has a bug in which column Q plays a special role.
See the attached workbook, in which just one cell is filled, first in column A, then in column B, etc.
- mtarlerSep 06, 2023Silver Contributorwow both are interesting additions.
Hans, extending your pattern even further is even more interesting with the 'anomaly point' moving from Q to the right and then extending the 'count down' to match that column number. Then if you add another of the same character (you could replace the 1 with a 2 or something else) in a column further to the right then that will dictate the "count down" value but will start at the location of the first occurrence. It makes me think of buffer overflows used to inject code when hacking like somehow it is overflowing into a sequence code space (especially with the -1 in the step location). Makes me think I should stop playing before I overwrite something I really don't want to get overwritten.- SergeiBaklanSep 07, 2023Diamond Contributor
That's great finding. We may discuss what is the nature of the bug and how to avoid it. However, I'd send a frown, let Joe to take care about this.