title: How to find nearest non-blank cell above the current cell?
body: <p>I have a column of data, and I need to find the previous non-blank cell.  For example, if I have the following data:</p>
  
  <pre><code>foo
  -
  -
  -
  -
  (formula)
  </code></pre>
  
  <p>where <code>-</code> denotes a blank cell, then I want the <code>(formula)</code> cell to find a reference to the cell containing <code>foo</code> no matter how many blank cells are inserted between them. It is possible that new rows with blank cells in the test column could be inserted between the formula row and the previous non-blank row at any time, and the formula should be able to handle that.</p>
  
  <p>Ideally, I would like to be able to put the formula in any cell on a row to find the nearest non-blank cell above that row in, say, column A.</p>
  
  <p>An image to further illustrate my needs (and maybe elicit alternative ways to do what I want):</p>
  
  <p><a href="https://i.stack.imgur.com/0eQ0x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0eQ0x.png" alt="SO32890557  Q example"></a></p>