calc labor hours required

josh_m

Board Regular
Joined
Mar 26, 2009
Messages
81
should be simple, but I can't figure it out
I have a sp.sheet that lists the required hours & required staff.
i want to calc the total labor hours
so I have the "In Time", "Out Time", "Staff Required", and "hours required"
example:
__A________B___________C_____________________D
1 in_______out__________# staff required________hours required
2 10:00_____19:00_______5

i want to calc the time between out and in, subtract 1 hour for lunch, then multiply to get total hours required
but when I enter this in D2:
=((B2-A2)-1)*C2
instead of the answer of 40 I am looking for, I get "#####"
i don't understand, please help
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
There as mismatch in your formula, if you want the result to be 40:00 then use this version

=((B2-A2)-1/24)*C2

format result cell as [h]:mm

or if you want the result to be 40

=((B2-A2)*24-1)*C2

format result cell as general or number
 
Upvote 0
thank you so very much, I have been feeling like a big dummy for an hour now.
that worked perfectly
 
Upvote 0
If you have entered 10:00 as a time then Excel stores this as a value of 0.416 and 18:00 as .7916, so subtracting 1 from the difference will give a value less than 1.

Try this instead and format the result as a number:
=(B2-A2-1/24)*C2*24

Andrew

Edit : too late!! I see the post has been asnwered......
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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