Bug 149624 - Fonction sierreur
Summary: Fonction sierreur
Status: CLOSED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2022-06-19 21:07 UTC by Patrice Morel
Modified: 2022-07-22 10:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Fichier_Formules_Ok_Libre_Office_7.2.5.2 (227.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-06-22 16:43 UTC, Patrice Morel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrice Morel 2022-06-19 21:07:03 UTC
Bonjour,
Dans Calc, j'utilise la fonction SIERREUR dans une formule conditionnelle. Ma formule fonctionne dans des versions précédentes de Libre Office, mais plus maintenant en version 7.3.4.2.
=(SI(CHERCHE($D$1;$B4)>=1;"x";SIERREUR(CHERCHE($D$1;$B4);"")))
Vous trouverez mon fichier exemple à l'adresse : http://www.patcatnats.fr/IMG/ods/bretons_encuisine_recettes_recherche_ingredients_v20220619a.ods
Merci de me tenir informé SVP.
Amicalement,
Patrice
Comment 1 raal 2022-06-22 16:27:02 UTC
Your link doesn't work. Please attach test file to the bug. Thank you
Comment 2 Patrice Morel 2022-06-22 16:43:37 UTC
Created attachment 180912 [details]
Fichier_Formules_Ok_Libre_Office_7.2.5.2

Fichier avec formules colonnes D et F qui bug avec Libre Office 7.3.4.2 mais fonctionne bien sous la version 7.2.5.2.
J'ai changé ma formule (exemple en D4) en =SI(SIERREUR(CHERCHE($D$1;$B4);"")="";"";"x") , mais je ne trouve pas çà très propre.
Comment 3 QA Administrators 2022-06-23 03:50:47 UTC Comment hidden (obsolete)
Comment 4 raal 2022-06-23 15:41:29 UTC
This seems to have begun at the below commit.
Adding Cc: to Eike Rathke; Could you possibly take a look at this one?
Thanks
 afc8b4b5f7f2598d3183ff74f91467c97c4d1eec is the first bad commit
commit afc8b4b5f7f2598d3183ff74f91467c97c4d1eec
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Sun Dec 26 16:28:07 2021 +0100

    source 1c14b9efb0677dea65ff220222fbb8d5c2aa6973

https://git.libreoffice.org/core/+/1c14b9efb0677dea65ff220222fbb8d5c2aa6973
Comment 5 Eike Rathke 2022-06-24 10:14:39 UTC
DeepL translation:

In Calc, I use the IFERROR function in a conditional formula. My formula works in previous versions of Libre Office, but not anymore in version 7.3.4.2.
=(IF(SEARCH($D$1;$B4)>=1; "x";IFERROR(SEARCH($D$1;$B4);"")))

File with formulas in columns D and F that bugs with Libre Office 7.3.4.2 but works fine under version 7.2.5.2.
I changed my formula (example in D4) to =IF(IFERROR(SEARCH($D$1;$B4);"")="";""; "x") but I don't find it very clean.
Comment 6 Eike Rathke 2022-06-24 10:39:53 UTC
That is exactly what that commit was about to fix bug 146377. Error values in the IF() condition are to be propagated and not ignored taking the ELSE path. In the past the expression worked by chance, but is not correct.
See also
https://wiki.documentfoundation.org/ReleaseNotes/7.3#Changed_spreadsheet_functions

This should work:

=IFERROR(IF(SEARCH($D$1;$B4);"x");"")

In the success case SEARCH() returns a value >=1 so the condition would be TRUE (for any value <>0) and the THEN path of "x" would be executed. Otherwise if SEARCH() returns an error value propagated by IF() the IFERROR() catches that and returns "".
Comment 7 Patrice Morel 2022-06-24 15:17:20 UTC
Thank
Sorry, it's not good :
=IFERROR(IF(SEARCH($D$1;$B4);"x");"")
Comment 8 Eike Rathke 2022-07-21 11:19:45 UTC
What is not good?
Comment 9 Patrice Morel 2022-07-21 14:51:31 UTC
Excuse me, ir's good, but Calc is french and in english its not good, also in french is :
=SIERREUR(SI(CHERCHE($D$1;$B4);"x");"")