title: How to apply the IsMissing function?
body: <p>I'm using Excel Version 1902, Build 11328.20392 within MS Office 365 ProPlus.</p>
  
  <p>I call a function from a cell in a worksheet:</p>
  
  <pre class="lang-none prettyprint-override"><code>=addOnlyPositiveValues(D2, E2, F2,G2)
  </code></pre>
  
  <p>Only the first parameter is mandatory, the others are optional:</p>
  
  <pre class="lang-vb prettyprint-override"><code>Function addOnlyPositiveValues(v01 As Range, Optional v02 As Range, Optional v03 As Range, Optional v04 As Range, Optional v05 As Range ) As Double
      Dim dblRet                  As Double
      dblRet = 0
      dblRet = var2dbl_positiveOnly(v01.Value)
      If Not (IsMissing(v02)) Then dblRet = dblRet + var2dbl_positiveOnly(CVar(v02.Value))
      If Not (IsMissing(v03)) Then dblRet = dblRet + var2dbl_positiveOnly(CVar(v03.Value))
      If Not (IsMissing(v04)) Then dblRet = dblRet + var2dbl_positiveOnly(CVar(v04.Value))
      If Not (IsMissing(v05)) Then dblRet = dblRet + var2dbl_positiveOnly(CVar(v05.Value))
  
  '    If Not (IsMissing(v05) Or (v05 Is Nothing)) Then dblRet = dblRet + var2dbl_positiveOnly(CVar(v05.Value))
  
      addOnlyPositiveValues = dblRet
  End Function
  </code></pre>
  
  <p>This worked until recently (can't tell exactly when it starting to act up).<br>
  In my example above I don't set a 5th parameter.<br>
  I expect the function to skip the <code>If Not (IsMissing(v05)) Then ...</code>. Stepping through the code I see that <code>v05</code> is <code>NOTHING</code>.</p>
  
  <p>My workaround:</p>
  
  <pre class="lang-vb prettyprint-override"><code>If Not (IsMissing(v05) Or (v05 Is Nothing)) Then ...
  </code></pre>