```
Private Sub CommandButton1_Click()
Dim lastRow As Integer, i As Integer, j As Integer, num As Integer, last As Integer, middle As Integer
Dim s As String
lastRow = Range("A" & Rows.Count).End(xlUp).Row
j = 1
i = 1
Range("C:D").Insert 0, 0
For i = 1 To lastRow
s = Range("A" & i).Value
middle = InStr(1, s, "-")
num = Left(s, middle - 1)
last = Mid(s, middle + 1)
While num <= last
Range("C" & j).Value = num
Range("D" & j).Value = Range("B" & i).Value
j = j + 1
num = num + 1
Wend
Next
Range("A:B").Delete
End Sub
```