title: Identify and output first and last records by group
body: <p>I have over 2 million records/rows of data to analyze. Each row of data has a task identifier in Column A that changes only when a new task begins.  An individual task can have any number of records (rows in Excel).  The rows for the same task are always in chronological order, oldest to newest.  </p>
  
  <p>My thinking is to cycle through the unique task identifiers in col A to determine the rows that correspond with each task. Once I have determined the first and last row for each, calculate the AGE of the task by subtracting the date in col B of the FIRST row of data from the date in col C of the LAST row for that task.  </p>
  
  <p>The unique identifier, the begin date, the end date and the elapsed time for each task should be output to another sheet in the workbook.</p>
  
  <p>How might I achieve this?</p>