i have reviewed my code and this should work better:
Private Sub Updater()
Dim TLRow, BLRow, x, y, z As Long
Dim rng, rng1 As Range
With Sheets("before")
BLRow = .Range("C65536").End(xlUp).Row
TLRow = .Range("C" & BLRow).End(xlUp).Row - 6
x = TLRow + 7
y = BLRow
z = TLRow
.Range("IV2:IV" & BLRow).Formula = "=C2&"" ""&D2"
c = x
Do Until c > y
Set rng = .Range("C1:C" & z)
Set rng1 = .Range("IV1:IV" & z)
On Error Resume Next
k = WorksheetFunction.Match(.Range("C" & c).Value, rng, 0)
m = WorksheetFunction.Match(.Range("IV" & c).Value, rng1, 0)
On Error GoTo 0
If k <> "" Then
If m = "" Then
Do Until n <> p
n = .Range("C" & k).Value
On Error Resume Next
p = CInt(Left(.Range("IV" & c).Value, Len(n)))
On Error GoTo 0
k = k + 1
Loop
k = k - 1
If .Range("C" & k).Value = "" And k < z Then
.Range("C" & k & ":D" & k).Value = _
.Range("C" & c & ":D" & c).Value
Else
.Rows(k).Insert
c = c + 1
.Range("C" & k & ":D" & k).Value = _
.Range("C" & c & ":D" & c).Value
x = x + 1
y = y + 1
z = z + 1
End If
End If
Else
z = z + 1
If .Range("C" & z).Value = " " Or _
.Range("C" & z).Value = "" Then
.Rows(z).Insert
c = c + 1
.Range("C" & z & ":D" & z).Value = _
.Range("C" & c & ":D" & c).Value
x = x + 1
y = y + 1
End If
End If
c = c + 1
k = ""
m = ""
n = ""
p = ""
Loop
.Columns("IV").ClearContents
End With
End Sub