title: Multiple output cells with UDF
body: <p>I want to print multiple output fields in cells in Excel using a user defined function.</p>
  <pre><code>Function CAL(dinero, impuesto)
  Dim strText As String
  Dim num As Double
  
  num = dinero * 6.8
  strText = &quot;Mas impuesto&quot;
  
  Range(&quot;A2&quot;).Value = strText
  Range(&quot;B2&quot;).Value = num
  
  CAL = dinero + impuesto
  CAL = Application.Round(CAL, 2)
  End Function
  </code></pre>
  <p>Current result:</p>
  <p><a href="https://i.stack.imgur.com/oRUX0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oRUX0.png" alt="enter image description here" /></a></p>
  <p>Expected result:</p>
  <p><a href="https://i.stack.imgur.com/woFWc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/woFWc.png" alt="enter image description here" /></a></p>