Hi, Sorry, I Got carried away.!! the Numbers I used for comparison in column "A", were the numbers after the Code , As the codes all seem to be the same.
I've now altered the code, so that It still only uses the numbers after the code, but it read that number from the full number in column "A".
The Results in "E are the missing Numbers,Checked against the numbers after the code in "A") but with code "0191 " added to the results, as you can see from the code.
Hope that fairly clear.
If this code works for you, I could add an Input Box to enter the Range of Numbers to Check, when you run the code, or you could enter them in a seperate cell, for the code to read.
Sub MG22Aug55
Dim Rng As Range, Dn As Range, Bnum As Integer, C As Integer, Chk As Integer
Dim Ray(1 To 601, 1 To 2), nRay, Temp As Double
Set Rng = Range(Range("A1"), Range("A" & Rows.Count).End(xlUp))
ReDim nRay(1 To 601)
For Bnum = 12200 To 12800
C = C + 1
Ray(C, 1) = Bnum
Next Bnum
For Each Dn In Rng
Temp = Trim(Right(Dn, Len(Dn) - InStr(Dn, " ")))
For Chk = 1 To UBound(Ray)
If Temp = Ray(Chk, 1) Then
Ray(Chk, 2) = Temp
Exit For
End If
Next Chk
Next Dn
C = 0
For Chk = 1 To UBound(Ray)
If Ray(Chk, 2) = "" Then
C = C + 1
nRay(C) = "0191 " & Ray(Chk, 1)
End If
Next Chk
Range("E1").Resize(C).Value = Application.Transpose(nRay)
End Sub
Regards Mick
Bookmarks