title: Excel VBA code mid function
body: <p>I have the following string "123 - 456789". What I am trying to do is find a way to only capture the remaining characters after the second space - "456789" - regardless the length of the string.</p>
  
  <p>I have the follow set of code:</p>
  
  <pre><code> For leftLoop = 2 To leftNumberOfCells
       Range("A" &amp; iRow) = Split(Range("B" &amp; iRow).Value, " ")                
       Range("B" &amp; iRow) = Mid("B" &amp; iRow, InStr("B" &amp; iRow, " "), 100)
  
       iRow = iRow + 1               
   Next leftLoop
  </code></pre>
  
  <p>The code line <code>"Range("B" &amp; iRow) = Mid("B" &amp; iRow, InStr("B" &amp; iRow, " "), 100)"</code> is what I tried, among other ways (from searching online, but I can't seem to get it to work.</p>
  
  <p>I have two questions:</p>
  
  <ol>
  <li>Does someone know what the correct code should be? and...</li>
  <li>Can I reference the cell where the string is located and replace it in that same cell after doing the mid function without having to temporarily put it into another cell and copy and paste it back? For example, my string "123 - 456789" is in cell B2, is there a way to code it so I can reference cell B2 and simultaneous replace the cell B2 with "456789" and not having to place it in another cell then copy and paste it back into B2. I hope you get what i'm asking.</li>
  </ol>
  
  <p>Thanks for you help!</p>