title: Creating A Time Range In Excel
body: <p>I'm trying to create a time range using multiple incidents which have occurred at several times throughout the day and night.</p>
  
  <p>So each group has had 2 or more incidents which have occurred at varying times throughout the day and I'd like to create a time frame for each group; say 09:00 - 14:00.  I've tried using MIN and MAX functions which work in a lot of cases, however when things happen over the Midnight things get tricky. For example:</p>
  
  <p>Data:</p>
  
  <p>Incident 1: 18:00 <br> Incident 2: 23:00 <br> Incident 3: 20:00 <br> Incident 4: 03:00 <br>Incident 5: 02:00</p>
  
  <p>The formula would result in: 18:00 - 03:00.</p>
  
  <p>I'm using an array formula to pull incidents that have a common group number out of a few thousand incidents.  Unfortunately i'm limited to Excel/VBA for this to work.  Thanks in advance.</p>
  
  <p>Edit: Here is perhaps a better example:<br></p>
  
  <p><a href="https://i.stack.imgur.com/czX0V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/czX0V.png" alt="enter image description here"></a></p>