+ Reply to Thread
Results 1 to 8 of 8

Thread: Tariff formula assistance please

  1. #1
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Tariff formula assistance please

    Good afternoon

    Daddy Longlegs kindly gave me a solution to a tariff problem that I encountered

    =IF(O13="","",CHOOSE(MATCH(O13,{0,0.5,5,20,30}),D13,D13+F13*CEILING(O13*2-1,1),O13*L13,O13*M13,O13*N13))

    In another tariff I have a slightly different structure which is

    B10 = First kilo charge (this is always charged + any additional Kilos)
    C10 = Rate per kilo for less than 10 kilos
    E10 = +10 kilos
    F10 = +20 kilos
    G10 = + 30 kilos
    H10 = + 45 kilos

    If then for example I had 25 kilos the result would be B10+24*F10, in my normal crude way I have tried to express this in a formula (that needless to say does not work) to show you what I mean

    =IF(J10<10,B10+C10*J10-C10,IF(J10>10<19,B10+E10*J10-E10,IF(J10>20<30,B10+F10*J10-F10,IF(J10>30<45,B10+G10*J10-G10,IF(J10>45,B10+H10*J10-H10)))))

    I tried to adapt the Daddy Longlegs formula to reflect this

    IF(J10="","",CHOOSE(MATCH(J10,{0,1,10,20,30,45} but I got this far and everyhting else I tried just did not help

    Any suggestions gratefully received

    Danny

  2. #2
    Registered User
    Join Date
    12-24-2007
    Location
    France - Alsace
    Posts
    4

    Tariff formula assistance please

    Could you perhaps explain what the last topic is.
    An example would be very helpful.

  3. #3
    Registered User
    Join Date
    10-18-2006
    Posts
    47
    what do you have in cell J10 ?
    can you post your sheet with what exactly you want?
    Can you also clarify if you want to calculate based on differential values, ex: for 25 kilos, base cost + cost for first 10 kilos + cost for next 10 kilos + cost for next 5 kilos OR

    base cost + cost for 25 kilos?

  4. #4
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Previous post info ref formula

    Thanks for your response

    This was the content of the original post to which daddy longlegs gave me the answer, I did try to find out how to mention this in my new posting but I cannot see a post number anywhere?

    Thanks

    Hello

    I have a rates tariff which I would like to automate,

    The tariff structure is

    First half kilo : Per half kilo up to 5 : +5 kilos : +20 kilos : + 30 kilos

    I am trying to do so by using something like this:-

    =IF(O13<0.5,D13,IF(O13>0.5<5,13*F13*2+D13-F13,IF(O13>5<20,O13*L13,IF(O13>20<30,O13*M13,IF(O13>30,O13*N13)))))

    Which does not work.

    Basically I want the user to enter a weight into O13 and then have the rate calculated as follows

    1. if the weight in O13 is less than 0.5 the rate in D13 applies
    2. If the weight is greater than 0.5 the rate is the first half kilo (D13) + the rate for every half kilo up to 5 kilos (if somebody shipped 3 kilos the rate would be D13 -first half) + 2.5 kilos * F13 * 2)
    3. if the weigh is >5 kilos but <20 kilos the flat rate is O13*L13
    4. If the weight is >20 kilos but <30 kilos the flat rate is O13*M13
    5. if the weight is >30 kilos the flat rate is 013*N13

    Could somebody help me to restructure my formula so that it works

    Thank you very much

  5. #5
    Cheeky Forum Moderator Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2003, 2007, 2010
    Posts
    3,701

    Tariff formula assistance please

    With
    J10: (the number of kilos)
    and

    B10: (charge for the first kilo)
    C10: (charge per kilos for 2 thru 9)
    E10: (charge per kilos over 1, if count is >=10)
    F10: (charge per kilos over 1, if count is >=20)
    G10: (charge per kilos over 1, if count is >=30)
    H10: (charge per kilos over 1, if count is >=45)

    See if this works for you.....
    =(J10>0)*B10+MAX(J10-1,0)*
    CHOOSE(MATCH(1,FREQUENCY(J10,{9,19,29,44}),0),C10,E10,F10,G10,H10)
    Does that help?
    Regards,

    Ron
    Microsoft MVP - Excel
    (Oct 2006 - Sep 2012)

    Click here to see the Forum Rules

  6. #6
    Forum Contributor ptm0412's Avatar
    Join Date
    04-16-2008
    Location
    Vietnam
    MS-Off Ver
    Office 2003 and 2007
    Posts
    103
    =IF(O13<0.5,D13,IF(O13>0.5<5,O13*F13*2+D13-F13,IF(O13>5<20,O13*L13,IF(O13>20<30,O13*M13,IF(O13>30,O13*N13)))))
    I want to make a spreadsheet to illustrate what I think, but I don't know exactly which Price would apply for each weight and the way you want to calculate: O13*F13*2+D13-F13 ???

    But I think it should be change like these:
    O13>0.5<5: And(O13<5,O13>=0.5)
    O13>5<20: And(O13>=5,O13<20)
    O13>20<30: ANd(O13>=20,O13<30)

    And this way is shorter:

    =IF(O13<0.5,D13,IF(O13<5,O13*F13*2+D13-F13,IFO13<20,O13*L13,IF(O13<30,O13*M13,O13*N13))))

  7. #7
    Registered User
    Join Date
    10-18-2006
    Posts
    47
    Lets assume your costs are:

    - base cost: 100
    - first 5 kilos is 5 dollars or whatever
    - 5 - 20: 10
    - 20 - 30: 20
    - above 30: 30

    use the following formula. You enter the kilo value in E9

    =100+IF(E9>30;30*(E9-0.5);IF(E9>20;20*(E9-0.5);IF(E9>5;10*(E9-0.5);(5*E9))))

    see if this is what you want, if not, we can modify
    would be good if you can paste some examples

  8. #8
    Registered User
    Join Date
    07-03-2008
    Location
    Johannesburg
    Posts
    15

    Job Done - Thanks

    Thanks Ron

    That is working perfectly

    Danny

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0