Created attachment 174779 [details] the announced attachment If a .FindAll(searchDescriptor) or a .ReplaceAll(searchDescriptor) is called from a SfheetCellRange service or from a SheetCellRanges service containing exactly one range (.Count=1) there is no action. The foundRanges is Null, and the replacement not executed. This I recently experienced with LibO V 7.2.0.4, but also trying old versions (32 bit) I found that even a version as early as 3.5.2 ad the bug. I couldn't test with versions in-betwwen, but the heritage version 3.3. was not afflicted. (AOO 4.1.7 also isn't.) Trying the code contained in the attached example should exemplify the bug. Run it with only a single range of the first sheet selected --> failure Select a second range OR the tab of the second sheet in addition --> success.
Sorryy! When reporting the bug I completely missed to emphasize (in fact I not even mentioned) the very important condition "searching for style". The Basic code in the attached example is containing the lines With searchDe .SearchStyles = True .SearchString = workCS End With The search for .SearchStyles = False with an ordinary .SearchString is NOT afflicted. Sorry
(In reply to Wolfgang Jäger from comment #0) > Created attachment 174779 [details] > the announced attachment > Trying the code contained in the attached example should exemplify the bug. > Run it with only a single range of the first sheet selected --> failure > Select a second range OR the tab of the second sheet in addition --> success. I reproduce. The failure error is: Inadmissible value or data type. Data type mismatch. Pointing to line 17 For Each rg In csRgs Arch Linux 64-bit Version: 7.5.0.0.alpha0+ / LibreOffice Community Build ID: f5c6ef40dd494f6984c6ed784fccc02806999836 CPU threads: 8; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: threaded Built on 7 September 2022