Forum

Notifications
Clear all

Formula for Trucking Calculator

5 Posts
2 Users
0 Reactions
215 Views
(@promo1313)
Posts: 16
Eminent Member
Topic starter
 

HI!

I am creating a trucking calculator in which the user enters a weight, and the amount to pay the trucker is displayed. The user selects the town from a drop down list on a second sheet named "Data"picking the town, and it calculates the rate depending on the town.

I have a VLOOKUP table on sheet 2 (Data) which lists the towns and their rates. There are only 2 rates which I divided into groups (1 and 2), and a third option, “Special” rate which will only show the word special. The columns in the VLOOKUP is:
Column 1: town name,
Column 2: rate
Column 3: either the number 1,or 2 (which classifies the towns into 2 zones), or the word “Special”.

on the main sheet, cell D8 has the drop down where the user picks the town. 

I8 has the rate from the VLOOKUP which pulls from the town. 

And K8 has the group number also pulling from VLOOKUP.

Cell D13 has the total calculated which multiplies the rate (I8) x weight entered in D4

so far I have the calculator showing the rate once the weight, or the word “Special” if it is a special rate:

=IF(I8=”SPECIAL”, “SPECIAL”, D4*I8)

Now I want to use MAX because there are minimum fees associated. So if the value that is calculated in E13 is less than 26.25, it will display 26.25 instead of the total.
now, the minimum in zone 1 (26.25) is different that zone 2 (29.40).

I need to create a formula that can identify what zone is being used, which can be identified by the number 1, or 2 in cell K8, and apply that minimum charge depending on it.

 

I attached the spreadsheet

 
Posted : 11/05/2019 12:30 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Robert

Please refer attached.

Hope this helps.

Sunny

 
Posted : 11/05/2019 7:21 pm
(@promo1313)
Posts: 16
Eminent Member
Topic starter
 

Hi Sunny,

 

Yes!  this works!

The only thing missing from the total calculation now is that if the rate is Special (not 1or 2), it displays the word Special in the total value field in D13.

right now its giving me the #VALUE! error

 
Posted : 14/05/2019 8:56 am
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Robert

Just change your formula in D13 to :

=IF(I8="SPECIAL", "SPECIAL", MAX(D4*I8,M8))

 
Posted : 14/05/2019 6:56 pm
(@promo1313)
Posts: 16
Eminent Member
Topic starter
 

SunnyKow said
Hi Robert

Just change your formula in D13 to :

=IF(I8="SPECIAL", "SPECIAL", MAX(D4*I8,M8))  

Thanks Sunny,

 

you've been a great help.

 
Posted : 15/05/2019 10:54 am
Share: