title: Change value of an element in an array VBA
body: <p>The following user defined VBA function does not give a specific error yet does not return a value. I have no idea why. Can anyone suggest how to amend this code so that it works? Thanks so much!</p>
  
  <pre><code>Public Function mytest(myrange As Range)
  
  myrange(1).Value = myrange(1).Value * 44
  
  mytest = myrange(1).Value
  
  End Function
  </code></pre>
  
  <p>I would call this function in a cell as follows for example;</p>
  
  <pre><code>=mytest(A1)
  </code></pre>
  
  <p>Cell A1 would contain a value, say 10. I would hope the function returns value 440.</p>