I am a novice requesting someone's help to make sense of what I have to do to attach a subtraction of time to the following IF statement, so that if the time worked is over 6 hours then a 30 minute lunch break is deducted from the total time spent at work - eg. if I spend 8 hours at work I end up getting paid for only 7:30.

Code:

`=IF(H13>G13,H13-G13,IF(H13<G13,(H13+12)-G13,IF(ISERROR(H13-G13),G13,)))`

This gives me the total hours at work, but I'd like to deduct the 30 minute lunch break from the total within the same formula if that's possible.

The error statement is for the odd text input, the cells should all represent times.

I have tried to do some things to it, but keep getting problems.

Any suggestions will be greatly appreciated.