title: Is excel how to get the max number with condition?
body: <p>In Excel, I use the Col A as the id number for my data, and the ID number begin at the year. Such as 2018xxxxxxx. I want to get the Max id number for a year.</p>
  
  <p>In python, use a simple condition check, then I can get the result. Such as.</p>
  
  <pre><code>col_A_max = max([x for x in range(A) if str(x) == '2016'])
  </code></pre>
  
  <p>I try to rewrite it in Excel but it did not work.</p>
  
  <pre><code>=max(if(A:A, left(A:A, 4) = "2016", A:A))
  </code></pre>