title: Filtering with newest version of rows in three different sheets
body: <p>My problem is finding a viable solution for identifying an ID-column in three different spreadsheets and then return the row with latest update time.</p>
  
  <p>Below is example, with the different spreadsheets represented. There are many more columns in the sheets, but these are the two that are measured (they are in date-time format IRL). The first two are event-triggered and the third is manual.</p>
  
  <pre><code>NEW DEAL CREATED         NEW STAGE UPDATE       IMPORT (DATAPROOFING)               
  +--------+------------+  +-------+-----------+  +-------+-----------+
  | ID     |UPDATE TIME |  |ID     |UPDATE TIME|  |ID     |UPDATE TIME|
  +--------+------------+  +-------+-----------+  +-------+-----------+
  | 233    | 21/05/2015 |  |233    |21/05/2015 |  |233    |01/04/2015 |
  | 234    | 22/05/2016 |  |233    |22/05/2015 |  |143    |31/02/2016 |
  | 325    | 02/05/2016 |  |234    |22/05/2015 |  |847    |11/07/2015 |
  | 326    | 01/01/2016 |  |234    |23/05/2015 |  |746    |19/08/2016 |
  | 327    | 03/04/2016 |  |233    |24/05/2015 |  |432    |05/03/2015 |
  | 328    | 05/03/2015 |  |233    |24/05/2015 |  |342    |20/01/2016 |
  +--------+------------+  +-------+-----------+  +-------+-----------+
  </code></pre>
  
  <p>The data I want is then a single row for each ID, returning the row of the sheet with the latest update date.</p>
  
  <p>I am using Google Spreadsheets for analytics for our CRM in the company. Here I import the deals from our customers, but I have to use both Zapier and manual imports, which means many duplicates, despite using different sheets.</p>
  
  <p>I have not succeeded in creating a filtering function, but my current one goes like this:</p>
  
  <pre><code>=iferror(
  if(
  iferror(
  index(Import!$N:$N,(match(Calculations!$B110,Import!$A:$A,0)),1),"IMPORTERROR")=MAX({index(Import!$N:$N,(match(Calculations!$B110,Import!$A:$A,0)),1),iferror(index(Zapier!$BV:$BV,(match(Calculations!$B110,Zapier!$A:$A,0))),""),index(Pipedrive!$BV:$BV,(match(Calculations!$B110,Pipedrive!$A:$A,0)))}),
  "ImportConvert",
  (if(
  iferror(
  index(Zapier!$BV:$BV,(match(Calculations!$B110,Zapier!$A:$A,0))),"ZAPIERERROR")=MAX({index(Import!$N:$N,(match(Calculations!$B110,Import!$A:$A,0)),1),iferror(index(Zapier!$BV:$BV,(match(Calculations!$B110,Zapier!$A:$A,0))),""),index(Pipedrive!$BV:$BV,(match(Calculations!$B110,Pipedrive!$A:$A,0)))}),
  "Zapier",
  (if(
  iferror(
  index(Pipedrive!$BV:$BV,(match(Calculations!$B110,Pipedrive!$A:$A,0))),"PIPEDRIVEERROR")=MAX({index(Import!$N:$N,(match(Calculations!$B110,Import!$A:$A,0)),1),iferror(index(Zapier!$BV:$BV,(match(Calculations!$B110,Zapier!$A:$A,0))),""),index(Pipedrive!$BV:$BV,(match(Calculations!$B110,Pipedrive!$A:$A,0)))}),
  "Pipedrive",
  "NONE"))))),"")
  </code></pre>
  
  <p>It doesn't quite work, as it requires the ID to be present in all sheets. This is not the case, as the manual import is not filled often.</p>
  
  <p>I am not skilled in programming and recognize that an array-solution might be present.</p>