Mardana wrote: ↑Tue Oct 29, 2024 2:57 am
… iserror(--TEXT(--MID($Data.$E$5:$E$2550;FIND(" ";$Data.$E$5:$E$2550)+1;LEN($Data.$E$5:$E$2550));"[mm]");0) …
This part of your Excel monster formula is bogus. FIND takes two parameters. LEN takes one parameter. MID takes three parameters. TEXT takes two parameters. ISERROR takes one parameter
but your formula supplies two. I doubt if this is a valid Excel formula. Perhaps Ithe original function in Excel was IFERROR, which
does take two parameters. In Excel IFERROR(expression;0) would mean: if the expression returns an error the function result is 0 otherwise it's the expression's value. Others have told you how to do that in OpenOffice.
ISERROR(--TEXT(--MID($Data.$E$5:$E$2550;FIND(" ";$Data.$E$5:$E$2550)+1;LEN($Data.$E$5:$E$2550));"[mm]");0)
FIND(111;222222222222222222) LEN(111111111111111111)
MID(111111111111111111;222222222222222222222222222222;33333333333333333333333)
TEXT(11111111111111111111111111111111111111111111111111111111111111111111111111111111;222222)
ISERROR(11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111;2)
There may be other problems as well.
I decline to attempt to fix the bogus Excel formula. The best way to determine what is wrong with a monster formula is to break it into multiple cells, as many as needed, each of which calls just one or two functions. Then you can examine each cell's formula and value until you find the problem. You will make more work for yourself if, after finding the trouble, you reassemble the monster formula.
FJCC wrote: ↑Tue Oct 29, 2024 3:36 am
I can't make any sense out of the second formula you posted.
This does look like other horrid Excel formulas I've seen. Excel considers boolean values to be distinct from numeric values, so numeric operations on booleans like SUM(boolean;boolean) can fail because the values are ignored, and boolean operations on numbers can fail for the same reason. The double negative is used to convert logical values to numeric values. The AND(number;number) operation is written as (number)*(number). These difficulties go away in Calc since boolean FALSE and TRUE are equivalent to 0 and 1. Maybe ‑‑MID and ‑‑TEXT are being used to convert text from those functions to numeric values, though I don't recall seeing this method elsewhere. I would use the VALUE function to make the intent clear.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).