title: Count all unique customers in date range
body: <p>I have a big spreadsheet with order data. And I have a column containing the &quot;customers first order date&quot; (lets call it column A), and then I have &quot;order data&quot; (lets call it column B).</p>
  <p>What I want to achieve is something like this - except the comparison of col A and col B doesn't work in COUNTIFS, and I can't get my head around how I could solve it:</p>
  <pre><code>=SUM(COUNTIFS(Sheet1!$A$2:$A$20000;&quot;=&quot;&amp;Sheet1!$B$2:$B$20000;Sheet!$A$2:$A$20000;&quot;&gt;=&quot;&amp;Sheet2!E$2;Sheet1!$A$2:$A$20000;&quot;&lt;=&quot;&amp;Sheet2!E$3))
  </code></pre>
  <p>Is there a way to do this with countifs?</p>
  <p>My data could be something like:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Col A</th>
  <th>Col B</th>
  <th>ID</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>01-01-2021 00:01:00</td>
  <td>01-01-2021 00:01:00</td>
  <td>1</td>
  </tr>
  <tr>
  <td>01-01-2021 00:01:00</td>
  <td>05-01-2021 20:11:33</td>
  <td>1</td>
  </tr>
  <tr>
  <td>01-04-2021 00:01:00</td>
  <td>01-04-2021 00:01:00</td>
  <td>3</td>
  </tr>
  <tr>
  <td>01-03-2021 00:01:00</td>
  <td>01-03-2021 00:01:00</td>
  <td>2</td>
  </tr>
  <tr>
  <td>01-04-2021 00:01:00</td>
  <td>24-04-2021 17:51:29</td>
  <td>3</td>
  </tr>
  <tr>
  <td>01-04-2021 00:01:00</td>
  <td>01-05-2021 19:55:59</td>
  <td>3</td>
  </tr>
  <tr>
  <td>01-04-2021 00:01:00</td>
  <td>04-06-2021 04:22:01</td>
  <td>3</td>
  </tr>
  <tr>
  <td>01-04-2021 00:01:00</td>
  <td>24-06-2021 18:09:44</td>
  <td>3</td>
  </tr>
  <tr>
  <td>29-04-2021 00:01:00</td>
  <td>04-06-2021 04:22:01</td>
  <td>4</td>
  </tr>
  <tr>
  <td>29-04-2021 00:01:00</td>
  <td>24-06-2021 18:09:44</td>
  <td>4</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>With this data, what I would expect from the forumula - if the start and end dates are in march - I want &quot;1&quot;, since that is the amount of the unique IDs with col A date in the range. If it is in january, I altso want &quot;1&quot;, since that is the amount of unique ID's with dates in column A that matches the range.
  And if it is april, I want &quot;2&quot;, since that is again the amount of IDs in the range.</p>