title: If or not working on null values
body: <p>I have the following code. The If contains an Or that when one of them (or both) is empty the code fails.</p>
  
  <pre><code>For Each cellName In sCMDB.Range("A2:A" &amp; uCMDB)
      devName = cellName.Offset(, 1)
      devIP = cellName.Offset(, 10)
      modNum = cellName.Offset(, 7)
      modId = cellName.Offset(, 14)
  
  Set mnScope = sScope.Range("A2:A" &amp; uScope).Find(modNum, , , lookat:=xlWhole)
  Set miScope = sScope.Range("B2:B" &amp; uScope).Find(modId, , , lookat:=xlWhole)
      If (modNum = mnScope) Or (modId = miScope) Then
          sScope.Cells(mnScope.Row, 3).Copy sCMDB.Cells(cellName.Row, 19)
          sScope.Cells(mnScope.Row, 4).Copy sCMDB.Cells(cellName.Row, 21)
      Else
          sCMDB.Cells(cellName.Row, 19).Value = "Not Measured"
          sCMDB.Cells(cellName.Row, 21).Value = "Not Measured"
      End If
  </code></pre>
  
  <p>If nmScope or miSCope are null, the code doesn't go further.
  I know I'm missing something, I just don't know what.</p>
  
  <p>While any of the previous is not null, this is flawless, when at least one is empty is where the problem begins.</p>
  
  <p>UPDATE1</p>
  
  <p>After reviewing some comments, I figured out that the sScope.cell copied to the sCMDB.cells are being the problem here</p>
  
  <pre><code>Set mnScope = sScope.Range("A2:A" &amp; uScope).Find(modNum, , , lookat:=xlWhole)
  Set miScope = sScope.Range("B2:B" &amp; uScope).Find(modId, , , lookat:=xlWhole)
      If ((modNum = mnScope) Or (modId = miScope)) Then
          **sScope.Cells(((miScope.Row) Or (mnScope.Row)), 3).Copy sCMDB.Cells(cellName.Row, 19)
          sScope.Cells(((miScope.Row) Or (mnScope.Row)), 4).Copy sCMDB.Cells(cellName.Row, 21)**
      Else
          sCMDB.Cells(cellName.Row, 19).Value = "N/A"
          sCMDB.Cells(cellName.Row, 21).Value = "N/A"
      End If
  </code></pre>
  
  <p>The issue is that if mnScope is nothing when checking the mnScope.row for getting the value that will be copy to sCMDB that value is empty.
  I've tried to assign both rows to the same value in order to see if any of those can be retrieved. </p>
  
  <p>Trying to avoid using multiple instances</p>
  
  <pre><code>If ((modNum = mnScope) Or (modId = miScope)) Then
      sScope.Cells(mnScope.Row, 3).Copy sCMDB.Cells(cellName.Row, 19)
      sScope.Cells(mnScope.Row, 4).Copy sCMDB.Cells(cellName.Row, 21)
      sScope.Cells(miScope.Row, 3).Copy sCMDB.Cells(cellName.Row, 19)
      sScope.Cells(miScope.Row, 4).Copy sCMDB.Cells(cellName.Row, 21)
  </code></pre>