title: SUMIFS Between Two Dates and Times in Excel
body: <p>I am trying to get the summation of a column between two dates and two times, where the days are different.</p>
  <p>The columns I have are:</p>
  <p>Table 1 = Time1, Time2, Date1, Date2</p>
  <p>Table 2 = Date, Time, Event</p>
  <p>Ideally, this formula would give the total number of events between Date1/Time1 and Date2/Time2</p>
  <p>I have tried the formula below, but am receiving the total number of events between those two times on both dates, instead of the number of events between the two.</p>
  <pre><code>Time Start  Time End    Date Start  Date End
  23:54:00    0:04:00     9/27/2021   9/28/2021
  
  =SUMIFS(Sheet1!$G:$G,Sheet1!$D:$D,&quot;&gt;=&quot;&amp;'ProductMadness-Postlogs Export'!U84,Sheet1!$D:$D,&quot;&lt;=&quot;&amp;'ProductMadness-Postlogs Export'!V84,,Sheet1!$C:$C,&quot;&gt;=&quot;&amp;'ProductMadness-Postlogs Export'!Y84,Sheet1!$C:$C,&quot;&lt;=&quot;&amp;'ProductMadness-Postlogs Export'!Z84)
  </code></pre>
  <p>*For context, Sheet1 has the event data, &quot;ProductMadness - Postlogs&quot; has the date and time data</p>