title: Google Sheets Arrayformula for maxifs
body: <p>G'day people, </p>
  
  <p>I am a long time supporter/reader but this is my first time posting on Stackoverflow so please bear with me. </p>
  
  <p><a href="https://i.stack.imgur.com/tFQ2n.png" rel="nofollow noreferrer">Example of the Sheet I am working in</a></p>
  
  <pre><code>=if(E2="",,If(maxifs($E:$E,$K:$K,K2)=E2,K2,""))
  </code></pre>
  
  <p>I am a little stumped on converting this maxifs formula above that I am trying to convert to an arrayformula in Google Sheets. This formula checks to ensure E2 (timestamp) is not blank and then compares then looks all over the timestamp column for a newer timestamp for a distinct identifier (Column K example: '43909Ben Johns' (a CONCAT of a reference number and a client)) to see if there is a new version of that identifier. if it cannot find it, it will populate the row with the latest in column L (where the formula is situated) with the same identifier that is in Column K on the same row. If it does find a newer version it will populate with "". </p>
  
  <p>I tried setting up an arrayformula however I could see that it wouldn't work as I was trying to convert it. It calculated the first row but left all other rows (about 10,000) blank and I suspect that is because it is trying to compare data on E2 and K2 with other rows in column E and K. Below is the array formula I tried:</p>
  
  <pre><code>=arrayformula(if(E2:E="",,If(maxifs(E2:E,K2:K,K2:K)=E2:E,K2:K,"")))
  </code></pre>
  
  <p>Any help to untangle this would be appreciated and if you need me to explain further, please let me know. </p>
  
  <p>EDIT: Added Sample of Sheet <a href="https://docs.google.com/spreadsheets/d/1k1qK2BuYOwDPCtHedg7zV72JmE3_TQYu9EBwZVogQbU/" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1k1qK2BuYOwDPCtHedg7zV72JmE3_TQYu9EBwZVogQbU/</a></p>
  
  <p>Kind Regards,
  Ben</p>