title: Runtime error 13 Type mismatch on **Names = Range("A2" + i)**
body: <p>So I'm trying to make a macro that adds spaces to a string based on how long the string is and I keep getting runtime error 13 type mismatch. Any suggestions? Thanks in advance!</p>
  
  <pre><code>Option Explicit 
  Sub AddSpacesToNames() 
  Dim Names As String, TotalNames As Integer, i As Integer  
  
  TotalNames = Application.WorksheetFunction.CountA(Range("A2", Range("A2").End(xlDown)))  
  
  For i = 1 To TotalNames     
      **Names = Range("A2" + i)**     
      If Len(Names) &gt;= 11 And Len(Names) &lt;= 12 Then         
          Names = (" " &amp; Names)     
      ElseIf Len(Names) &gt;= 9 And Len(Names) &lt;= 10 Then         
          Names = ("  " &amp; Names)     
      ElseIf Len(Names) &gt;= 7 And Len(Names) &lt;= 8 Then         
          Names = ("   " &amp; Names)     
      ElseIf Len(Names) &gt;= 5 And Len(Names) &lt;= 6 Then         
          Names = ("    " &amp; Names)     
      ElseIf Len(Names) &gt;= 3 And Len(Names) &lt;= 4 Then         
          Names = ("     " &amp; Names)     
      ElseIf Len(Names) &gt;= 1 And Len(Names) &lt;= 2 Then         
          Names = ("      " &amp; Names)     
      End If 
  Next i  
  
  End Sub
  </code></pre>