meal allowance

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Hi, Little bit workload but I need to figure out a calculation for this meal allowances with formulas:
A truck company pays their drivers a meal allowance but only when they are not driving and out of the base, the allowances are:
1- Breakfast 20USD from 7:30 to 9:30
2- Lunch = 40 USD from 12:30 to 14:30
3- Dinner = 50 USD from 19:30 to 21:30
For example, the truck start the journey 5:00 on the 2nd August, arrived in the first layover at 19:30 on the same day the driver is entitled to Dinner only, on the 3rd AUG the driver stay all day in this city resting so the driver is entitled to breakfast, lunch, and dinner, on the 4th AUG the journey starts at 04:00. The journey last until 14:35 only Dinner will be paid because the driver arrived 14:35 and miss by 5 minutes the lunch allowance.
The company only pays the meals if the drivers are out of the home base and not are driving at the time.

Any help is more than welcome.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
[TABLE="width: 907"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col span="3"><col></colgroup><tbody>[TR]
[TD]A1[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[TD]M[/TD]
[TD]N[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Date[/TD]
[TD]Away[/TD]
[TD]Driving at
Breakfast[/TD]
[TD]Driving at
Lunch[/TD]
[TD]Driving at
Dinner[/TD]
[TD] [/TD]
[TD]Breakfast[/TD]
[TD]Lunch[/TD]
[TD]Dinner[/TD]
[TD]Total[/TD]
[TD] [/TD]
[TD]Driving
Start[/TD]
[TD]Driving
Stop[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]8/1/17[/TD]
[TD]x[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]20[/TD]
[TD]40[/TD]
[TD]50[/TD]
[TD]110[/TD]
[TD] [/TD]
[TD]None[/TD]
[TD]None[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]8/2/17[/TD]
[TD]x[/TD]
[TD] [/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD] [/TD]
[TD]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD]20[/TD]
[TD] [/TD]
[TD]5:00[/TD]
[TD]7:00[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]8/3/17[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD]x[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD]0[/TD]
[TD] [/TD]
[TD]5:00[/TD]
[TD]20:00[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Hello Manolocs - I hope this will help you get started.

The equation I used in H3 is: =IF(AND($C3="x",D3<>"x"),20,"")
 
Upvote 0
The equation in I3 is: =IF(AND($C3="x",E3<>"x"),40,"")
The equation in J3 is: =IF(AND($C3="x",F3<>"x"),50,"")

Let me know if you do not understand what I'm trying to do here.
 
Upvote 0
The driver would then have to fill in an x in columns C, D, E, and F as appropriate. If they are away - put an x in column c, if driving at breakfast, put an x in column d and so forth.
 
Upvote 0
Hi goesr, Thanks for your time but the idea is to get this "x" from the times the driver is working and not to make it all manually. there is a Start time and End time and then the spreadsheet should calculate.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,196
Members
452,616
Latest member
intern444

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top