title: Excel macro: Last non-empty cell in a column
body: <p>This is a followup question to <a href="https://stackoverflow.com/q/5441885/69537">this one</a>.</p>
  
  <p>The following formula can be used to find the value of the last non-empty cell in a column, in Microsoft Excel:</p>
  
  <pre><code>=LOOKUP(2,1/(A:A&lt;&gt;""),A:A)
  </code></pre>
  
  <p>My question is, how can I convert this formula to a Macro function? So that I can use it like this:</p>
  
  <pre><code>=GetLastValueInColumn('A')
  </code></pre>
  
  <p>Indeed, I need to convert the letter 'A' to range A:A, but don't know how.</p>