title: How to count fields in a column and display in another cell
body: <p>In excel I have 4 columns, we are only really interested in the 3 columns which are Column B (Date) format is dd/mm/yyyy Column C (Time) and Column D (Duration)</p>
  
  <p>For each date I’m trying to determine the following</p>
  
  <p>The total number of records for each date (Display in column E)
  The first time of that date (Display in column F)
  The last time of that date (Display in Column G)
  The total number of records where the duration was higher than 00:05:00 (Display in column H) format is hh:mm:ss</p>
  
  <pre><code>Dim n As Long
  n = Application.CountIf(Range("D:D"), "&gt;00:05:00")
  With Sheet1
      .Range("$H$2").value = n
  End With
  </code></pre>
  
  <p>So far I have been looking at duration part of the coding</p>
  
  <p>I do have this working, the only problem I have is that it sorts all records and doesnt only display it per date? If anyone could help me that would be great as its driving me mad.</p>