Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi Paul,

On 21/10/13 00:26, Paul wrote:
Ok, so I just used a file hosting service found via Google search.
Here's the file I modified with my two solutions:

http://www.filedropper.com/electricity_1

It didn't work the first time or two that I tried to download the file
to check, not sure why, but it worked the third time, so maybe
persevere if it doesn't work first time for you.

When I tried to open the file again, I got told the security settings
prevented macros from running, and the cells that used the user
function to calculate your answer showed "#VALUE", I think it was.

Ditto but ignored it. :(


You
can reduce the security settings to allow macros to run, of course, but
perhaps this is not the best way forward after all, although it is
still an elegant solution for some values of elegant.

There is always sending it as an email attachment :)

So if using just formulas, I liked Brian's use of MAX(0, value) instead
of my IF(value > 0, value, 0), so I would probably substitute that
first off, to make the formulas I've used more legible. I would still
strongly recommend intermediate steps for each line of Brian's formula,
and then one simple SUM to get the final answer.
=MIN(G4;$A$72)*$B$71
+MAX(0;(MIN(G4;$A$73)-$A$72)*$B$72)
+MAX(0;(MIN(G4;$A$74)-$A$73)*$B$73)
+MAX(0;(G4-$A$74)*$B$74)

Also, while Brian has, as I understand it (without actually trying it
out), combined the information into a simple table, much as I first felt
should be done, this does mean the price brackets can't change per
month, while my solution does allow for this. Your choice.

I like Brian's MIN/MAX idea too but the price might well need to change on a month, it just depends on when the local authority increases prices.

Hope this helps, and feel free to ask me for any clarifications of what
I've done.

Time for coffee. My brain is getting frazzled going thru each of the replies. I am very thankful for them though.

Hylton
P.S: Like the idea of Macro security.
--
========================================================================
Hylton is a Lions Club member of Lions Club of Fish Hoek (District 410A)
http://www.fishhoeklionsclub.org.za being part of the worlds
largest non profit NGO
========================================================================



--
To unsubscribe e-mail to: users+unsubscribe@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.