title: Bypass error from StDev_P when range has no values
body: <p>I am trying to handle errors in a program that takes in a set of ranges, and among other items, calculates its Standard Deviation.  Because some ranges passed in are empty, I get a <code>Run-time error: Unable to get the StDev_P property of the WorksheetFunction Class</code>.  However, I am having trouble bypassing it. I tried the following, but the error still throws.</p>
  
  <pre><code>        set WF = Application.WorksheetFunction
          If Application.WorksheetFunction.IsError(WF.StDev_P(range1)) = True Then
              sd = 0
          Else
              sd = WF.StDev_P(range1)
          End If
  </code></pre>