Is there some way to enter and later edit cell formulas while seeing them in a structured way? Instead of seeing this in formula bar (in one usually enormous and arbitrary wrapped line):
=IF( J$5 < G4; IF( B3 = B4; $KontAddr.$A$1 = 1; $KontAddr.$A$1 = 2); $KontAddr.$A$1 = 3)
to see something like this (in several lines with manually or automatically entered line breaks and tabs):
=IF( J$5 < G4;
IF( B3 = B4;
$KontAddr.$A$1 = 1;
$KontAddr.$A$1 = 2
);
$KontAddr.$A$1 = 3
)
I have LibreOffice calc documents with many variables and large number of rows. With many dependencies spread across many sheets formulas have recently become so complex as to be almost unreadable. If I store intermediate results in a new sheets or cells, I will soon run into memory and speed problems.
Best solution for less cluttered and more readable formulas would be some kind of macro language. VBA or Python or another real macro language is too complex and too different than calc internal functions to be used often, fast and for great variety of dissimilar problems. Naming sub segments of complex formulas is useless because formula expression names don’t have arguments.
I have tried to manually structure appearance of my cell formulas by entering line breaks in formula bar editor. It is possible to force “new line” character with Ctrl-Enter. However, new line character 0x0A (\n) is later automatically replaced with space, and line breaks are not saved upon formula entering.
Is there some way to configure Calc to stop replacing “New line”, Tab and possibly some other control or escape characters in cell formulas so we could manually break formulas in several lines to enhance readability, and than save that formatting? Comment escape character would also be useful. These control characters should be treated like “spaces”, that is ignored, but retained in .ods document. It would enormously enhance usability for non trivial Calc documents.
Last option that I can think of is some add-on program which completely replace formula editing bar with its own formula editor. Than it can automatically and dynamically reformat and syntax highlight formulas according to Calc syntax.
Is there way to enhance readability of complex formulas by any of the above possibilities?
Version: 6.4.5.2
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 4.12; UI render: default; VCL: kf5;