IF Function Time [Solved/Closed]

Report
-
 Ashakil -
Hello,

I am trying to make a rota and I need help with a formula.

A1 B1 C1
07:00:00 14:30:00 =b1-a1

The person starts work at 7am and finished at 14h30. C1 represents how many hours they work (which the result is 7h30 or 07:30:00)
However when someone works over 6 hours, I need 30 minutes taken off automatically for their break which they do not get paid for. If they work only 6 hours or less then I want the result to just show 'b1-a1'. Can you help please?

1 reply

Posts
1934
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
July 21, 2021
144
Ashakil, Good morning.

Try to use:

=IF(B1-A1>TIME(6,0,0),(B1-A1-TIME(0,30,0)),B1-A1)

Please, tell us if it worked for you.

I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
It worked!! Thank you. I had to remember to convert the cell with the answer into time format afterwards but it worked very well.

Thank you again

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!