+ Reply to Thread
Results 1 to 4 of 4

Looking for VBA function/macro for a rate table calculation

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco
    MS-Off Ver
    2010
    Posts
    5

    Looking for VBA function/macro for a rate table calculation

    I'm looking for help in creating a function or macro that will calculate a fee based on a tiered fee table.

    In reference to the attached file, I have a defined fee table that is used to calculate a fee based on volume discounts. Given a table or list of volumes, I would like to call a function or macro to calculate the appropriate fee. I currently accomplish this using nested IF statements, but this method is too cumbersome because I frequently need to add/delete tiers and replicate the table/calculation in different parts of the spreadsheet.

    As such I would like to take the step of making the calculation a "procedure call" via a function or macro. I realize I may have to modify or replicate the function or macro to accommodate additional or reduced tiering, but I can live with that.

    While I have done some Basic programming in my past, I'm new to VBA in the Excel environment.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Looking for VBA function/macro for a rate table calculation

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    09-11-2014
    Location
    San Francisco
    MS-Off Ver
    2010
    Posts
    5

    Re: Looking for VBA function/macro for a rate table calculation

    Thanks, but I see I was unclear in what I was trying to achieve. The pricing is such that the client is assessed a fee of $8 on each of first 500 items, $7 on the subsequent 500 items, and so on. So if the client has 2,000 items, he's paying (500 x $8 + 500 x $7 + 1,000 x $6) for a total of $13,500 and an average cost of $6.75.

    I'm looking for a custom formula to calculate the total.
    Last edited by coryhouston; 09-11-2014 at 06:01 PM.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Looking for VBA function/macro for a rate table calculation

    Try this:

    Please Login or Register  to view this content.
    Last edited by stnkynts; 09-11-2014 at 07:11 PM.

+ 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. Heart Rate Calculation
    By emam in forum Excel General
    Replies: 3
    Last Post: 06-15-2014, 05:51 PM
  2. [SOLVED] What function can I use to add a flat rate plus an hourly rate?
    By dosmin777 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-27-2014, 02:26 AM
  3. Asking Rate Calculation
    By pradeep247 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-28-2013, 09:30 AM
  4. Need Help with Function for Table Calculation
    By tgib64 in forum Excel General
    Replies: 3
    Last Post: 11-09-2012, 03:42 PM
  5. Rate of Return Calculation
    By slide in forum Excel General
    Replies: 0
    Last Post: 08-03-2009, 01:39 PM

Tags for this Thread

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