Excel 2010<table rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB" cellpadding="2.5px"><colgroup><col style="background-color: #DAE7F5" width="25px"><col><col><col><col><col><col><col></colgroup><thead><tr style=" background-color: #DAE7F5;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=";">Inmate </td><td style=";">In</td><td style=";">Out</td><td style=";">days</td><td style=";">Average</td><td style=";">Excel 07/10</td><td style=";">Excel <07/10</td></tr><tr><td style="color: #161120;text-align: center;">2</td><td style=";">A</td><td style="text-align: right;;">1/1/2011</td><td style="text-align: right;;">1/4/2012</td><td style="text-align: right;;">368</td><td style=";">A</td><td style="text-align: right;;">369.3333</td><td style="text-align: right;;">369.3333333</td></tr><tr><td style="color: #161120;text-align: center;">3</td><td style=";">B</td><td style="text-align: right;;">1/2/2011</td><td style="text-align: right;;">1/5/2012</td><td style="text-align: right;;">368</td><td style=";">B</td><td style="text-align: right;;">369.3333</td><td style="text-align: right;;">369.3333333</td></tr><tr><td style="color: #161120;text-align: center;">4</td><td style=";">C</td><td style="text-align: right;;">1/3/2011</td><td style="text-align: right;;">1/6/2012</td><td style="text-align: right;;">368</td><td style=";">C</td><td style="text-align: right;;">370</td><td style="text-align: right;;">370</td></tr><tr><td style="color: #161120;text-align: center;">5</td><td style=";">D</td><td style="text-align: right;;">1/4/2011</td><td style="text-align: right;;">1/9/2012</td><td style="text-align: right;;">370</td><td style=";">D</td><td style="text-align: right;;">371</td><td style="text-align: right;;">371</td></tr><tr><td style="color: #161120;text-align: center;">6</td><td style=";">A</td><td style="text-align: right;;">1/5/2011</td><td style="text-align: right;;">1/10/2012</td><td style="text-align: right;;">370</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=";">B</td><td style="text-align: right;;">1/6/2011</td><td style="text-align: right;;">1/11/2012</td><td style="text-align: right;;">370</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=";">A</td><td style="text-align: right;;">1/7/2011</td><td style="text-align: right;;">1/12/2012</td><td style="text-align: right;;">370</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=";">B</td><td style="text-align: right;;">1/8/2011</td><td style="text-align: right;;">1/13/2012</td><td style="text-align: right;;">370</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=";">C</td><td style="text-align: right;;">1/9/2011</td><td style="text-align: right;;">1/16/2012</td><td style="text-align: right;;">372</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;">11</td><td style=";">D</td><td style="text-align: right;;">1/10/2011</td><td style="text-align: right;;">1/17/2012</td><td style="text-align: right;;">372</td><td style="text-align: right;;"></td><td style="text-align: right;;"></td><td style="text-align: right;;"></td></tr></tbody></table>
Sheet1
<table rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" cellpadding="2.5px" width="85%"><tbody><tr><td style="padding:6px">
Worksheet Formulas<table rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB" cellpadding="2.5px" width="100%"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th style=" background-color: #DAE7F5;color: #161120" width="10px">F2</th><td style="text-align:left">=AVERAGEIF(
$A$2:$A$11,E2,$D$2:$D$11)</td></tr><tr><th style=" background-color: #DAE7F5;color: #161120" width="10px">D2</th><td style="text-align:left">=C2-B2</td></tr></tbody></table></td></tr></tbody></table>
<table rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" cellpadding="2.5px" width="85%"><tbody><tr><td style="padding:6px">
Array Formulas<table rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB" cellpadding="2.5px" width="100%"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th style=" background-color: #DAE7F5;color: #161120" width="10px">G2</th><td style="text-align:left">{=AVERAGE(
IF($A$2:$A$11=E2,$D$2:$D$11,""))}</td></tr></tbody></table>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself</td></tr></tbody></table>
Drag formulas down.