On 03/21/2013 07:18 PM, Mirosław Zalewski wrote:
Hi
Some time ago I had to write a function that will display filename of current
Calc workbook. After some Googling and trial and error I came up with this
monster:
=RIGHT(MID(CELL("FILENAME";A1);2;
FIND("'#";CELL("FILENAME";A1))-2);LEN(MID(CELL("FILENAME";A1);2;
FIND("'#";CELL("FILENAME";A1))-2))-FIND("$$$";SUBSTITUTE(
MID(CELL("FILENAME";A1);2;FIND("'#";CELL("FILENAME";A1))-2);"/";"$$$";
LEN(MID(CELL("FILENAME";A1);2;FIND("'#";CELL("FILENAME";A1))-2)) -
LEN(SUBSTITUTE(MID(CELL("FILENAME";A1);2;FIND("'#";CELL("FILENAME";A1))-2);"/";"")))))
(Of course it could be shorter if only temporary cells were allowed; you can
clearly see that much of this function is multiplication of some formula set.)
Since I am beginner of Calc, I had really hard time working on this. That made
me wonder:
how do I effectively work with long formulas in Calc? What
tools/extensions/tips are there to ease my work?
How can I keep track of relevant parts of each function, their input and
output values etc?
How do you guys handle such things?
Thanks in advance for any tips.
One question to ask is what is the final output supposed to be? Often
this will give clues to the type of functions needed and their order.
Also, I tend to scroll the Calc function list to see if there is a
function I am not familiar with that does what I want. Often I have
found a complex formula can be made more manageable by searching for
functions and finding some that make the final formula more compact and
easier to understand.
I do not try to memorize the functions.
--
Jay Lozier
jslozier@gmail.com
--
For unsubscribe instructions e-mail to: users+help@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.