title: Excel function for First Row and Last Row of group
body: <p>I have a gate keeping report with a number of entry/exit times for an employee over a 24hr period.</p>
  <p><a href="https://i.stack.imgur.com/NPktd.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NPktd.jpg" alt="enter image description here" /></a></p>
  <p><strong>I need another formula to go into I40 which is the difference between the first entry time - last entry time for each employee eg. I40 = F50 - D40.</strong></p>
  <p>Dont worry about the formula regarding the subtraction of dates as I have this.  I really just need the formula that will allow me to get the Last Exit time cell and the First Entry time cell for each employee.</p>