Created attachment 201759 [details] demonstrating the bug Also present in 25.8.0.0.beta1 The summary says it all. XMATCH with mode=0 and searchdirection=-1 returns #N/A where 1 should be expected
Confirmed! @Wolfgang: another workaround: =XMATCH("\d+";B2:E2;3;-1)
Reproducible: Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 7ef1c437f30b0869a5b9fa33809bac2c6665ace3 CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win Locale: en-US (es_ES); UI: en-US Calc: CL threaded The file, saved as xlsx after set up the use of wildcards, none of the formulas work with: Microsoft® Excel® para Microsoft 365 MSO (versión 2506 compilación 16.0.18925.20076) de 64 bits
Created attachment 201763 [details] corrected loop Off-by-one error. BTW, changing i>0 to i>=0 will not work because SCSIZE is unsigned integer.
Balázs can you please have a look? Thank you
Balazs Varga committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/649346506b8ec0670e35d30c5e04358e40244c36 tdf#167468 - sc: fix XMATCH with mode=0 and searchdirection=-1 It will be available in 26.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Balazs Varga committed a patch related to this issue. It has been pushed to "libreoffice-25-8": https://git.libreoffice.org/core/commit/3a6c72a553d89e1b0f80858fd603916d66182212 tdf#167468 - sc: fix XMATCH with mode=0 and searchdirection=-1 It will be available in 25.8.0.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Balazs Varga committed a patch related to this issue. It has been pushed to "libreoffice-25-2": https://git.libreoffice.org/core/commit/04287a89f49b4dd29c9fcb393a4fddc02e673a7b tdf#167468 - sc: fix XMATCH with mode=0 and searchdirection=-1 It will be available in 25.2.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.