title: Type Mismatch arises when adding a basic loop in VBA
body: <p>I have a basic If ElseIf statement I'm trying to loop over a few hundred rows. The If/Else statement itself works until I try and Loop it (which I've included below). When I run it, it gives me a run time error "13" -type mismatch. I Initially set <code>MyCell</code> as a <code>String</code> until I had this error arise. Then I figured setting <code>MyCell</code> as a <code>Variant</code> I would be able to avoid this situation but it's still returning the RTE 13.  </p>
  
  <pre><code>Sub code_reassign()
  Dim Count As Integer
  Dim MyCell As Variant
  
  Count = 1
  
  Do While Count &lt; 10
      MyCell = ActiveCell.Value
  
      If MyCell = "Busycotypus canaliculatus" Then
          ActiveCell.Offset(0, -1).Value = "N106"
      ElseIf MyCell = "Busycon carica" Then
          ActiveCell.Offset(0, -1).Value = "N104"
      ElseIf MyCell = "Busycon perversum" Or "Busycon sinistrum" Then
          ActiveCell.Offset(0, -1).Value = "N103"
      ElseIf MyCell = "Busycotypus spiratus" Then
          ActiveCell.Offset(0, -1).Value = "N107"
      Else
      End If
  
      ActiveCell.Offset(1, 0).Select
      Count = Count + 1
  
  Loop
  
  End Sub
  </code></pre>
  
  <p>I'm still super new to VBA but have been thrown in the deep end at work. I'm doing what I can and studying the basics at home at nights to try and catch up.  Any insight as to why the loop is creating a problem with mismatching would be highly appreciated.</p>