title: VBA Macro Run Time Error 13 - Type Mismatch
body: <p>This is a string of code for a commission's report. It runs fine with zero problems daily, and was last run on the 13th. </p>
  
  <p>This morning I am receiving a <code>Run Time Error 13 Type Mismatch</code>. </p>
  
  <p>I have no clue why, but when I Debug, it highlights this section:</p>
  
  <p><code>If UCase(Cells(i, 1).Value = "200265 - MP"</code> Then</p>
  
  <p>I have tried to retype it, but when I do, I get an error for the word Then that states the following:
  <code>Compile error: Expected: list seperator or )</code></p>
  
  <p>How can I run this?</p>
  
  <p>Here's the code:</p>
  
  <pre><code>Sheets("Errors").Select
  Cells.Select
  Selection.Sort Key1:=Range("A2"), Order1:=xlDescending, Header:=xlGuess, _
      OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
      DataOption1:=xlSortNormal
  Sheets("Errors").Select
  With Sheets("Errors")
      lastrow = .Range("C" &amp; Rows.Count).End(xlUp).Row
  End With
  For i = lastrow To 1 Step -1
      Cells(i, 1).Select
      If UCase(Cells(i, 1).Value = "200265 - MP" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "160850 - TP" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "170566 - VB" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "201447 - JB" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "202006 - BL" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "203646 - MM" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
      If UCase(Cells(i, 1).Value) = "203917 - KT" Then
          Rows(i).Select
          Selection.Cut
          Sheets("Temp").Select
          Rows("1:1").Select
          Selection.Insert Shift:=xlDown
          Sheets("Errors").Select
      End If
  </code></pre>