title: Return the row number of the last non blank cell, comparing from the first row of a column until the current row, using an array formula
body: <p>I've extensively searched about this and I've achieved a good level at all, but I haven't achieved my desired goal: Return the row number of the last non blank cell, having the evaluation range for the comparison starting from the first row of the desired column until the current row. This should be done using Googles' "array formula". </p>
  
  <p>What I've got until now is able to perform the above task, but not using "array formula".</p>
  
  <p><strong>My formula is as follows:</strong> </p>
  
  <pre><code>=MAX(
  FILTER( 
        row(
            INDIRECT(
           JOIN("";ADDRESS(1;column()+2;4);":";ADDRESS(row();column()+2;4))
                    )
            )
    ;
        INDIRECT(               
           JOIN("";ADDRESS(1;column()+2;4);":";ADDRESS(row();column()+2;4))
                 )
  &lt;&gt; "")
  )
  </code></pre>
  
  <p>.</p>
  
  <p><strong>Here goes the code sample operating over some data:</strong>
  <a href="https://i.stack.imgur.com/8CZJ0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8CZJ0.png" alt="enter image description here"></a></p>
  
  <p><strong>Summarizing, any of the following alternatives would answer my question:</strong></p>
  
  <ul>
  <li>Having my above formula converted to fit inside Google's "array formula".</li>
  <li>Having a new solution using "array formula". </li>
  </ul>
  
  <p>Ps: By "arrayFormula" I mean that it just will be necessary to write the formula one time at the top of the column, allowing the array to expand to the cells bellow. </p>
  
  <p>Ps2: A solution in Google AppScript would be welcomed, but I can't ensure it will completely fit the scope of my problem.</p>
  
  <p>Really thanks</p>