Nick,
A small modification of the Barry Houdini formula (without MEDIAN fucntion):
Note: no more smart, but if you want try it.
<b>Excel 2007</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>A</th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">1</td><td style="text-align: center;;">Start</td><td style="text-align: center;;">End</td><td style=";">Time worked</td><td style="text-align: right;;"></td><td style=";">Range</td><td style="text-align: center;;">08:00</td><td style="text-align: center;;">16:00</td></tr><tr ><td style="color: #161120;text-align: center;">2</td><td style="text-align: center;;">8/3/11 20:03</td><td style="text-align: center;;">8/6/11 17:10</td><td style="text-align: center;;">16:00</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">3</td><td style="text-align: center;;">8/2/11 09:17</td><td style="text-align: center;;">8/8/11 02:45</td><td style="text-align: center;;">30:42</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">4</td><td style="text-align: center;;">8/4/11 01:39</td><td style="text-align: center;;">8/4/11 12:03</td><td style="text-align: center;;">04:03</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">5</td><td style="text-align: center;;">8/2/11 00:22</td><td style="text-align: center;;">8/2/11 13:35</td><td style="text-align: center;;">05:35</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">6</td><td style="text-align: center;;">8/3/11 08:20</td><td style="text-align: center;;">8/7/11 13:25</td><td style="text-align: center;;">23:39</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">7</td><td style="text-align: center;;">8/1/11 18:40</td><td style="text-align: center;;">8/7/11 06:37</td><td style="text-align: center;;">32:00</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">8</td><td style="text-align: center;;">8/4/11 17:12</td><td style="text-align: center;;">8/5/11 01:33</td><td style="text-align: center;;">00:00</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">9</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr><tr ><td style="color: #161120;text-align: center;">10</td><td style="text-align: center;;">************</td><td style="text-align: center;;">************</td><td style="text-align: right;;"></td><td style=";">******</td><td style=";">******</td><td style=";">******</td><td style=";">******</td></tr></tbody></table><p style="width:4.2em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet42</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">A2</th><td style="text-align:left">=RANDBETWEEN(<font color="Blue">40756,40760</font>)+RAND(<font color="Blue"></font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">B2</th><td style="text-align:left">=A2+RANDBETWEEN(<font color="Blue">0,5</font>)+RAND(<font color="Blue"></font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">C2</th><td style="text-align:left">=IF(<font color="Blue">NETWORKDAYS(<font color="Red">A2,B2</font>)>1,(<font color="Red">$G$1-$F$1</font>)*(<font color="Red">NETWORKDAYS(<font color="Green">A2,B2</font>)-1</font>),0</font>)+
IF(<font color="Blue">NETWORKDAYS(<font color="Red">B2,B2</font>)>0,IF(<font color="Red">(<font color="Green">MOD(<font color="Purple">B2,1</font>)>F$1</font>)*(<font color="Green">MOD(<font color="Purple">B2,1</font>)<G$1</font>),MOD(<font color="Green">B2,1</font>),IF(<font color="Green">(<font color="Purple">MOD(<font color="Teal">B2,1</font>)<=F$1</font>),F$1,G$1</font>)</font>),G$1</font>)-
IF(<font color="Blue">NETWORKDAYS(<font color="Red">A2,A2</font>)>0,1,0</font>)*IF(<font color="Blue">(<font color="Red">MOD(<font color="Green">A2,1</font>)>F$1</font>)*(<font color="Red">MOD(<font color="Green">A2,1</font>)<G$1</font>),MOD(<font color="Red">A2,1</font>),IF(<font color="Red">(<font color="Green">MOD(<font color="Purple">A2,1</font>)<=F$1</font>),F$1,G$1</font>)</font>)</td></tr></tbody></table></td></tr></table><br />
Markmzz