title: Function that finds last row in Excel using VBA
body: <p>I am trying to build a simple function that has 1 cell input based on which, it offsets the last consecutively filled cell in this roll.</p>
  
  <pre><code>Option Explicit
  Function LastCell(CellA As String)
  
      LastCell = Range(CellA).End(xlDown).Value
  
  End Function
  </code></pre>
  
  <p>For some reason, it is not work...</p>
  
  <p>Without VBA, I achieve the desired result through: <code>=LOOKUP(9E+50,B:B)</code> for example. </p>
  
  <p>Not a very elegant and not always useful. </p>