• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

diference in transportcost

Belleke

Well-Known Member
See example
I am looking for a formula that calculates the cost under 15.000 km at 0.018 and the difference above the 15.000 at 0.022 and make a total
 

Attachments

  • 1.xlsx
    19.2 KB · Views: 6
you already seem to do that - BUT i would use a bracket whenever you have a + or - along with * /
((B10-15000)*D10)+(15000*C10))
as the order excel carries out these calculations can lead to wrong results
excels order of calc

BUT i get the same result with brackets
whats the issue
 

Attachments

  • 1-ETAF.xlsx
    13.4 KB · Views: 4
This one workks
Code:
=IF(C2<=15000;C2*VLOOKUP(B2;A10:D12;3;0);(C2-15000)*VLOOKUP(B2;A10:D12;4;0)+15000*VLOOKUP(B2;A10:D12;3;0))
I want this something like this
Code:
=((B10-15000)*D10)+(15000*C10)
 
What about
Code:
=MAX(0;(B10-15000)*D10)+(MIN(B10;15000)*C10)

YearKM0 -> 15000 km+15000 kmTotal
2021​
17509​
0,0180,022
325,198​
325,198​
=MAX(0;(B10-15000)*D10)+(MIN(B10;15000)*C10)
2022​
22173​
0,0190,022
442,806​
442,806​
2023​
12944​
0,0240,028
310,656​
310,656​
 
Back
Top