title: Inserting row for every missed number in a sequence
body: <p>I am looking to insert a row for every missed number in my sequence. For example, I have "35C-1412-K01" and "35C-1421" and the idea is to add a row for every missed number between 1412 to 1421. I have done this before however, the code that I used does not work for this one due to the fact that the code compares the last 5 characters in the cell and I am looking more into the middle number of that cell. My idea is to possibly use the "MID" property and not the "RIGHT" property but I am having trouble implementing that. I also have some cells that have more than three characters before the first "-" i.e "35TC-1411" so that could possibly throw off the code if it only accounts for there to be only three characters. Any help in this is greatly appreciated. </p>
  
  <p>Code that I referenced above: </p>
  
  <pre><code>Option Explicit
  Sub InsertNullTest()
  Dim i As Long, gap As Long
  Dim WorkRng As Range
  
  On Error Resume Next
  Set WorkRng = Application.InputBox(Prompt:="Range To Check", Title:="Select a Range", Default:=Selection.Address, Type:=8)
  On Error GoTo 0
  If WorkRng Is Nothing Then Exit Sub '&lt;--| check user hasn't canceled the dialog box
  With WorkRng
      For i = .Rows.Count To 2 Step -1
          gap = Right(.Cells(i), 5) - Right(.Cells(i - 1), 5)
          If gap &gt; 1 Then .Cells(i).Resize(gap - 1).Insert xlDown
      Next
  End With
  End Sub
  </code></pre>