Before asking I tried doing some research on possible formulas but I guess I am not getting it. also I have a basic/intermediate knowledge of excel. and I only have about two weeks on excel2013 previously on 2007.

So question is I need a formula to automatically deduct 30min of lunch if they worked 8hrs or no lunch break if they work 4hrs.

8hrs deduct 30mins
4hrs no lunch

I found the following formula but it is not working:

=(B3-A3)*24-IF((B3-A3)*24>8,1,IF((B3-A3)*24>6,0.5,0))

Cells in A&B are formatted 1:30PM
Cell in C is formatted [h]:mm

In advance, thank you for time and patience.