title: Worksheetfunction.average returning error when range contains empty cells or cells with text
body: <p>I am dealing with small ranges (only one column) that can contain both numbers and text (or empty cells). The description of the <code>worksheetfunction.average</code> says that "Arguments can either be numbers or names, arrays, or references that contain numbers." and "If an array or reference argument contains text, logical values, or empty cells, those values are ignored." It says too that "Empty cells are not counted, but zero values are." </p>
  
  <p>However, </p>
  
  <pre><code>With Sh 
  SlpStdBlkCorr_Sh.Range("T2") = WorksheetFunction.Average(.Range(RawPb208Range)) 
  End with
  </code></pre>
  
  <p>raises the "<strong>unable to get the average property of the worksheetfunction class</strong>" error.</p>
  
  <p>This line of code is used repeatedly, so all variables are perfectly set and this error only raises when the range has empty cells or cells with text. </p>
  
  <p>Shouldn't the <code>.average</code> ignore these cells with non-numeric contents? </p>
  
  <p>I have tried the solution by <a href="http://excelvbaerror.blogspot.com.br/2012/07/runtime-error-1004-unable-to-get.html" rel="nofollow">Paul Aford</a>, but the problem is that as I am calculating somethings and I can create some monsters just equaling variables to 0 (<code>SlpStdBlkCorr_Sh.Range("T2")=0</code>) or 1 (<code>SlpStdBlkCorr_Sh.Range("T2")=1</code>).</p>
  
  <p>Ideas?</p>