slomof

New Member
Joined
Jun 19, 2018
Messages
2
Hi,

Ive got a huge list of numbers with letters example:

C144846AJB
C144847AJB
C144848AJB
C144849AJB
C144869DC
C144872EG
C144876GH
C144877AK

<colgroup><col></colgroup><tbody>
</tbody>

how do pick up quickly what is out of sequence?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
....why not....

What do you mean by out of sequence? Your example is in sequence, as far as Excel is concerned.
 
Upvote 0
What I mean if there is numbers missing example: how can mark that between C144869DC and C144872EG there are some missing
 
Upvote 0
Assuming your data starts in A2 and column C is available to list the missing numbers :
Code:
Sub MG17Jan41()
Dim Rng As Range, Dn As Range, n As Long, Dic As Object
Dim oMax As Long, oMin As Long, c As Long, Tem As String
c = 1
Set Rng = Range([A2], Cells(Rows.Count, "A").End(xlUp))
Set Dic = CreateObject("scripting.dictionary")
Dic.CompareMode = vbTextCompare
For Each Dn In Rng: Dic(Mid(Dn.Value, 2, 6) * 1) = 0: Next
oMax = Application.Max(Dic.keys)
oMin = Application.Min(Dic.keys)
Tem = Range("C1").Value: Range("C:C").ClearContents: Range("C1").Value = Tem
For n = oMin To oMax
    If Not Dic.exists(n) Then
        c = c + 1
        Cells(c, "C") = n
    End If
Next n
End Sub

Above code adapted from here : https://www.mrexcel.com/forum/excel-questions/914909-vba-require-find-missing-numbers.html
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top