title: Unable to get the average property of the worksheetfunction class
body: <p>Hi I'm trying to write vba to help me convert daily data into weekly data. I wrote this vba but said <code>unable to get the average property of the worksheetfunction class</code>. Is it possible someone can help me figure whats wrong? thanks!</p>
  
  <pre><code>Sub CopyData()
  Dim z As Integer
  
    For z = 0 To 2000
  
     Set Rng1 = ActiveSheet.Range("D5:D11").Offset(7 * z, 0)
  
      Range("runningagain").Offset(z, 0) = Application.WorksheetFunction.Average(Rng1)
  
      Do Until IsEmpty(ActiveCell.Value)
        ActiveCell.Offset(1, 0).Select
      Loop
  
    Next z
  
  End Sub
  </code></pre>