Hi there

Here is the Scenario, A friend of mine who works for a Trucking company asked me this Question; This is How their company calculates His Pay for the Trips that he Makes.

@ first 100 Meter + Loading A Value of 1 Which will be Multiplied by the weight of the Load “L” and then a Flat Fee of “X’, And Off course The weight is not of any Issue for us for time being.

@ first 100 Meter + Loading A Value of 1 * X

@ Next 500 Meter a value of Max. 500-100=400 => 400/100= 4, then A Value of 4 * Y, Then if Total Traveling is 350 Meter, There we will have 1*X*L + 2.5*Y*L

And again L is not important and for time Being Could left Out.

@ Next 10 Kilometer A value of [Number of Kilometer - .5]*Z Then Max would be 9.5 * Z

@ Traveling of Over 10 and Less Than 30 Kilometer would be [Number of Kilometer – 10] * W Then a Traveling of 27 would be 17 * W

@ Over 30 Kilometer a Value of [Number of Kilometer – 30] * V

And Finally all these would be added up accordingly.

So far so good, and There is no Problem and Easily I can Use Excel To Calculate Every thing for me Just by Entering the Total travel amount and the Weigh of the Load, Using If, And Vlookup.

But Here it gets Complicated, They have these Following additional Conditions;

1: If the Traveling Road is a High way or Major Paved Roads Then all the above Values would be multiply by .77

2: If the Road is a Semi Paved Road then all the Above Values would be multiplies by .9

3; If the Road is a Dirt Road then all above would be Multiply by 1

For Example if the Traveling is 17 Kilometer and 2 kilometer is Dirt at the Beginning, and 2 Kilometer is the semi Paved at the end and the Rest are Fine Paved Road.

1*X*1+ 4*Y*1 + 1.5*Z*1 + 8*Z*(.77) + 5*W*(.77) + 2*W(.9)

Any Help on how to do this would be Highly appreciated.

Regards

jhonExcel