title: VBA: How to change the value of another cell via a function?
body: <p>I'm an Excel VBA newbie.</p>
  
  <p>How to change the value of the specified cell via a user-defined function? What's wrong with this code:</p>
  
  <pre><code>Function Test(ByVal ACell As Range) As String
    ACell.Value = "This text is set by a function"
    Test := "Result"
  End Function
  </code></pre>
  
  <p>My wish is ... when I type <code>=Test(E6)</code> in cell E1, Excel will display the specified text in E6.</p>