Calculate meal allowances

Manolocs

Active Member
Joined
Mar 28, 2008
Messages
340
Hello, How can I calculate the total of each allowance the employee is entitle during the given period?

Start Time: 22/Mar/17 12:50
End Time: 30/Mar/17 18:50
Breakfast Between: 7:30 and 9:30
Lunch between: 12:30 and 14:30
Dinner between: 19:30 and 21:30

Thanks in advance
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi,

I am not sure what you are asking about. What is the total allowance? Do you mean time, number of meals, money, something else?

Next, I would like to see how the data in your worksheet is organized, how much space can be occupied by the calculation, etc.

J.Ty.
 
Upvote 0
Yes J.Ty, the total number of breakfast dinner and lunch no money involved only the data I show. it is preferred to be done in formulas, I am using MAC computer. Column A = name, B= Start time, C=End Time, D=Breakfast, E=Lunch, F=Dinner. other than this is available to calculations.
 
Upvote 0
Ok, I can try counting the number of meals. What happens if, say, End Time is in the middle of a meal break (say, at 19:50)? Should I count the last dinner then or not? The same question applies to Start TIme.

J.Ty.
 
Upvote 0
If the employee end work at 19:31 he has right a dinner allowance, this is valid for all times...
Thanks for your help J.Ty.
 
Upvote 0
Try these:

For the number of breakfasts =(MOD($C2,1)>--"7:30")+(MOD($B2,1)<--"9:30")+INT($C2)-INT($B2)-1
For the number of lunches =(MOD($C2,1)>--"12:30")+(MOD($B2,1)<--"14:30")+INT($C2)-INT($B2)-1
For the number of dinners =(MOD($C2,1)>--"19:30")+(MOD($B2,1)<--"21:30")+INT($C2)-INT($B2)-1
 
Upvote 0
Another solution.


Excel 2016 (Windows) 64 bit
ABCDEFGHIJ
1Start timeEnd timeMeals Full daysMeal first dayMeals last dayTotal mealsHelpBreakfastLunchDinner
2-3300007:30:0112:30:0119:30:01
3009:30:0014:30:0021:30:00
Sheet7
Cell Formulas
RangeFormula
C2=(DAYS(B2,A2)-1)*3
D2=4-MATCH(TIME(HOUR(A2),MINUTE(A2),0),$G$3:$J$3)
E2=MATCH(TIME(HOUR(B2),MINUTE(B2),0),$G$2:$J$2)-1
F2=C2+D2+E2
H2=TIME(7,30,1)
H3=TIME(9,30,0)
I2=TIME(12,30,1)
I3=TIME(14,30,0)
J2=TIME(19,30,1)
J3=TIME(21,30,0)
 
Upvote 0
Hi J.Ty,

Firstly, I'm hoping this thread is still monitored. I'm looking to create a spreadsheet very similar to the one above, but to track which allowances are due based on times of the day worked.

- Breakfast, Lunch and Dinner times and amounts should be specified and form part of the base reference.
- There should also be an "incidentals" amount added if the period worked is 24 hours or more.
- Start and end time and therefore would need both date and time function to calculate which meals are owed as well as any "incidental" allowance as per the above.
- A total for each shift (specified by start and finish date & time) would show the total amount for that shift.

Any assistance would be apprecaited.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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