title: Average function in macro not returning value
body: <pre><code>Dim XXXX as string
  
  XXXX = Sheets("Sheet1").Application.WorksheetFunction.Average(Range("J7:J607")).value
  Sheets("Log").Cells(2, "Z").value = XXXX
  
  End Function
  </code></pre>
  
  <p>Please see the above macro. I need the average of the values available in J column and need to paste that average value in "Log" sheet. But the value is not returning, instead leaving it as a blank cell. But the code runs fine, not showing any error.</p>
  
  <p>Please help me to fix this issue guys.</p>