title: run time error 13: type mismatch everytime i run my code
body: <p>I get this <a href="https://msdn.microsoft.com/en-us/library/aa264979%28v=vs.60%29.aspx" rel="nofollow">type mismatch (Error 13)</a> when I try to run the script. Below is the code highlighted error.
  I'm trying to enter this formula with VBA into the cell but I got an error. </p>
  
  <pre><code>TopVisibleCell.Formula = _
   "=IF(ISERROR(LEFT(I2,SEARCH( " - " ,I2)-1)),I2,LEFT(I2,SEARCH( " - " ,I2)-1))"
  </code></pre>