title: INDEX MATCH array formula for 1M rows
body: <p>I have two sets of data that need to be matched based on IDs and timestamp (+/- 3 units converted from time), and below is the formula that I've been using in Excel to do the matching. Recently I've had to run this formula on up to 1 million rows in Excel, and it takes a REALLY long time, crashes too. I'm wondering if there is a faster way to do this, if not in Excel?</p>
  
  <pre><code>=INDEX(A:A,MATCH(1,--(B:B=E3)*--(ABS(C:C-F3)&lt;=3),0),1)
  </code></pre>
  
  <p>Data Set 1:
  Column A: States
  Column B: IDs
  Column C: Timestamp</p>
  
  <p>Data Set 2:
  Column D: Email Addresses
  Column E: IDs
  Column F: Timestamp</p>
  
  <p><strong>Column G</strong>: <code>=INDEX(A:A,MATCH(1,--(B:B=E3)*--(ABS(C:C-F3)&lt;=3),0),1)</code></p>
  
  <p>Goal: Append "States" Column to Data Set 2 matched on IDs and Timestamp (+/- 3 time units) match.</p>
  
  <p>Just don't know how to run this formula on very large data sets.</p>