+ Reply to Thread
Results 1 to 10 of 10

Formula Help... Calculating charges based on stepped rates.

  1. #1
    Registered User
    Join Date
    06-20-2014
    Location
    Indiana, USA
    MS-Off Ver
    2013
    Posts
    10

    Question Formula Help... Calculating charges based on stepped rates.

    Never tried complicated formulas in Access and at a bit of a loss... What I am trying to do is calculate a utility bill based on stepped rated.

    For example:

    Usage up to the first 500KHW is billed at .067 per KWH
    Usage after the first 500KWH from 501 to 999 is billed at .044 per KWH
    Usage from 1000 up is billed at .0318

    So if my usage was 1200 KWH...

    ((500 x .067)+(500 x .044)+(200 x .0318)) = 61.86

    I was assuming it would require an complex "if" function to split the 1200 into steps and then calculate charges per step?

  2. #2
    Registered User
    Join Date
    06-20-2014
    Location
    Indiana, USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Formula Help... Calculating charges based on stepped rates.

    Should I be using boolean algebra or nested if functions?

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula Help... Calculating charges based on stepped rates.

    SUMPRODUCT is what you need. I can't set the equations for you, as you haven't posted a sheet. But take a look at this. It'll do the trick for you. It was posted by someone else here recently, but I can't remember who...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Registered User
    Join Date
    06-20-2014
    Location
    Indiana, USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Formula Help... Calculating charges based on stepped rates.

    Thanks for the response. Attached is what I am working with thus far. I plugged in what I thought was correct based on the formula from your attachment. However it does not compute the correct value. Perhaps I am doing it wrong?
    Attached Files Attached Files

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula Help... Calculating charges based on stepped rates.

    Mmm. Never copy anyone else equations without thinking.... you do need SUMPRODUCT, but... use this variant instead.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    06-20-2014
    Location
    Indiana, USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Formula Help... Calculating charges based on stepped rates.

    Awe... Thanks so much!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Formula Help... Calculating charges based on stepped rates.

    Glenn's suggestion will give you a total cost. If you want a line-by-line total, try this...
    =IF(F2>=500,33.5,F2*0.067)+IF(F2>1000,22,(F2-500)*0.044)+IF(F2>1000,(F2-1000)*0.0318)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Formula Help... Calculating charges based on stepped rates.

    You're welcome and thanks for the Reputation.

  9. #9
    Registered User
    Join Date
    06-20-2014
    Location
    Indiana, USA
    MS-Off Ver
    2013
    Posts
    10

    Re: Formula Help... Calculating charges based on stepped rates.

    @FDibbins

    Quote Originally Posted by FDibbins View Post
    Glenn's suggestion will give you a total cost. If you want a line-by-line total, try this...
    =IF(F2>=500,33.5,F2*0.067)+IF(F2>1000,22,(F2-500)*0.044)+IF(F2>1000,(F2-1000)*0.0318)
    Not sure I follow.

    I get the same resulting value... or was that the point, showing another way to calculate and/or best practices?

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Formula Help... Calculating charges based on stepped rates.

    All I was saying was that Glenn's (very good) formula, will give a total for all of those rows. If you wanted an individual total for each row, you could use my suggestion. If you then totaled those totals, you would come back to Glenn's answer

    So, if you just want 1 over-all answer, use Glenn's

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] calculating electric charges
    By djnosnow in forum Excel General
    Replies: 3
    Last Post: 04-02-2014, 04:13 AM
  2. Excel for calculating charges min. max. cap
    By mojokid in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-23-2012, 08:13 AM
  3. Formula to Sum Charges Based on Dates for each Patient
    By chuckwud in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-27-2011, 11:03 AM
  4. Comparing interest charges with fixed and variable interest rates.
    By carloski6 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2010, 08:53 AM
  5. Replies: 0
    Last Post: 08-23-2005, 12:33 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1