Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    I have a spreadsheet where I have a formula to calculate the monetary water charges see F48 onwards. I have attempted to do this, but need a more streamlined formula. The value in F48 is correct, but i need a better formula. F49 is incorrect. The correct value for F49 is in I49.


    It would be appreciated if someone could assist

    Thanks

    Howard
    Attached Files Attached Files

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    See the attached version; I created a lookup table and used MATCH and INDEX in a series of intermediate formulas to calculate the result.
    Attached Files Attached Files

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this formula in the F column:
    Code:
    =SUM(E78*$F$22,MAX(0,(E78-$F$6)*($F$23-$F$22)),MAX(0,(E78-$G$6)*($F$24-$F$23)),MAX(0,((E78-$H$6)*($F$25-$F$24))))

  4. #4
    Bronze Lounger
    Join Date
    Feb 2008
    Posts
    1,420
    Thanks
    124
    Thanked 5 Times in 5 Posts
    Hi Guys

    Thanks very much for the help.

    Hans when I now save the file, it comes up with a "privacy warning about active X controls, macro's etc. How can I remove this warning? Please advise

    Regards

    Howard

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    I ticked the "Remove personal information from this file on save" check box in the Security tab of Tools | Options...
    To get rid of the warning, either clear that check box, or remove the code module in the Visual Basic Editor.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •