You modified the code incorrectly: I have changed the whole macro to reflect the changes, and made a few other changes. Let me know...
Sub MissingNumbers2()
Dim rng As Range
Dim rng1 As Range
Dim StartV As Single, EndV As Single, i As Single, j As Single
Dim k() As Single
Dim WS As Worksheet
ReDim k(0)
On Error Resume Next
Set rng = Range("C2:C3000")
StartV = InputBox("Start value:", , "4360201")
EndV = InputBox("End value:", , "4360")
On Error GoTo 0
Set WS = Sheets.Add
WS.Name = "MissingNumbers"
WS.Range("A1:A" & rng.Rows.CountLarge).Value = rng.Value
With WS.Sort
.SortFields.Add Key:=WS.Range("A1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
.SetRange Range("A1:A" & rng.Rows.CountLarge)
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Set rng1 = WS.Range("A1:A" & rng.Rows.CountLarge)
For i = StartV To EndV
If IsError(Application.Match(i, rng1, False)) Then
If IsError(Application.Match(i, Worksheets("List").Range("A:A"), False)) Then
k(UBound(k)) = i
ReDim Preserve k(UBound(k) + 1)
End If
End If
Next i
WS.Range("B1:B" & UBound(k) + 1) = Application.Transpose(k)
WS.Range("B" & UBound(k) + 1).Value = UBound(k)
Worksheets("2014").Range("AJ2:AJ" & Rows.CountLarge).ClearContents
WS.Range("B1:B" & UBound(k) + 1).Copy Worksheets("2014").Range("AJ2")
End Sub
Bookmarks