trouble with if and text formula

kyle_emp

New Member
Joined
Jan 10, 2005
Messages
3
Hi I'm trying to put together a weekly schedule for work it would show the start time, finish time, and hours daily and then total the hours for the week. to total the hours daily I have been using the formula
=text(d6-c6,"h:mm")
the problem is that after working six hours an employee is allowed an unpaid 30 minute break so I've been trying to nest the previous formula into an if formulawhere if the result of the text formula is greater than 6 hours subtract 30 minutes. My problem is that I'm a novice excel user and still very new to if formulas as a result all I have been sucessful at is generating error messages. Any help would be greatly appreciated.

Many thanks
Kyle
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If A2 has the start time and B2 the finish time:

=B2-A2-((B2-A2)>=(6/24))*(1/48)

If there is a possibility of date change i.e., finish time being smaller than the start time, use:

=B2-A2+(A2>B2) -((B2-A2)>=(6/24))*(1/48)

You do not need to use the TEXT function. Just format the cell "h:mm"
 
Upvote 0

Forum statistics

Threads
1,222,414
Messages
6,165,891
Members
451,992
Latest member
kaurmanjodh

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